git-build-recipe 'nest' fails if directory exists (bzr-builder works)

Bug #1788033 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-build-recipe (Ubuntu)
New
Undecided
Unassigned

Bug Description

# fresh bionic container, as root.
$ apt-get update && apt-get install git-build-recipe bzr-builder

$ bzr branch lp:simplestreams trunk.dist
# 460 is the last functional bzr version
$ bzr branch -r 460 trunk.dist upstream-bzr
$ bzr branch lp:~simplestreams-dev/simplestreams/pkg-trusty pkg-trusty
$ git clone https://git.launchpad.net/simplestreams upstream-git

$ cat recipe-bzr
# bzr-builder format 0.3 deb-version 0.1.0~bzr{revno}-0ubuntu1~14.04.{revno:packaging}
./upstream-bzr
nest packaging ./pkg-trusty debian

$ cat recipe-git
# git-build-recipe format 0.4 deb-version {latest-tag}-{revno}-g{git-commit}-0ubuntu1
./upstream-git master
nest packaging ./upstream-git debian ubuntu/trusty-packaging-only

$ cat run-bzr
#!/bin/sh
bzr -Derror dailydeb --safe --no-build \
    --manifest=manifest-bzr.txt \
    --distribution=trusty --allow-fallback-to-native \
    --append-version=~ubuntu14.04.1 ./recipe-bzr ./worktree-bzr

$ cat run-git
#!/bin/sh
git-build-recipe --safe --no-build \
    --manifest=manifest-git \
    --distribution=trusty --allow-fallback-to-native \
    --append-version=~ubuntu14.04.1 ./recipe-git ./worktree-git/

$ ./run-bzr
Building tree.
Retrieving './upstream-bzr' to put at './worktree-bzr/recipe-bzr-0.1.0~bzr{revno}-0ubuntu1~14.04.{revno:packaging}'.
Retrieving './pkg-trusty' to put at './worktree-bzr/recipe-bzr-0.1.0~bzr{revno}-0ubuntu1~14.04.{revno:packaging}/debian'.

$ ./run-git
Traceback (most recent call last):
  File "/usr/bin/git-build-recipe", line 11, in <module>
    load_entry_point('git-build-recipe==0.1', 'console_scripts', 'git-build-recipe')()
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/main.py", line 110, in main
    build_tree(base_branch, working_directory)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 479, in build_tree
    _build_inner_tree(base_branch, target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 403, in _build_inner_tree
    instruction.apply(target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 582, in apply
    target_path=os.path.join(target_path, self.nest_path))
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 400, in _build_inner_tree
    pull_or_clone(base_branch, target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 306, in pull_or_clone
    raise TargetAlreadyExists(target_path)
gitbuildrecipe.recipe.TargetAlreadyExists: ./worktree-git/recipe-git/debian already exists, but has no .git directory.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: git-build-recipe 0.3.5
ProcVersionSignature: Ubuntu 4.17.0-6.7-generic 4.17.9
Uname: Linux 4.17.0-6-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Mon Aug 20 20:12:59 2018
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: git-build-recipe
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.