branch name with forward slash: unknown revision or path not in the working tree

Bug #2033314 reported by Adam Reviczky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-buildd
New
Undecided
Unassigned

Bug Description

Using a git recipe with a branch name that contains a forward slash results in the following error:
"unknown revision or path not in the working tree"

The following sample recipe shows an example with branch name "debian/latest":
# git-build-recipe format 0.4 deb-version 2.13.0+dfsg-1
lp:~reviczky/freetype/+git/freetype-debian debian/latest

The error message is as follows:
RUN ['git-build-recipe', '--safe', '--no-build', '--manifest', '/home/buildd/build-RECIPEBRANCHBUILD-3580935/chroot-autobuild/home/buildd/work/tree/manifest', '--distribution', 'mantic', '--allow-fallback-to-native', '--append-version', '~ubuntu23.10.1', '/home/buildd/build-RECIPEBRANCHBUILD-3580935/chroot-autobuild/home/buildd/work/recipe', '/home/buildd/build-RECIPEBRANCHBUILD-3580935/chroot-autobuild/home/buildd/work/tree']
fatal: ambiguous argument '691a63d70748362fc9bd84071e0185c1013b4c0f^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: not a valid object name: 691a63d70748362fc9bd84071e0185c1013b4c0f^{tree}
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
pristine-tar: command failed: git archive --format=tar 691a63d70748362fc9bd84071e0185c1013b4c0f\^\{tree\} | (cd '/tmp/pristine-tar.aYn9udOVNS' && tar x)
/usr/lib/python3/dist-packages/debian/changelog.py:484: UserWarning: Found eof where expected first heading
  warnings.warn(message)
Initialized empty Git repository in /home/buildd/build-RECIPEBRANCHBUILD-3580935/chroot-autobuild/home/buildd/work/tree/recipe/.git/
From https://git.launchpad.net/~reviczky/freetype/+git/freetype-debian
 * [new branch] debian/bullseye -> source/debian/bullseye
 * [new branch] debian/buster -> source/debian/buster
 * [new branch] debian/latest -> source/debian/latest
 * [new branch] debian/stretch -> source/debian/stretch
 * [new branch] pristine-tar -> source/pristine-tar
 * [new branch] upstream/latest -> source/upstream/latest
 * [new tag] debian/2.6.3-3.2+deb9u1 -> debian/2.6.3-3.2+deb9u1
 * [new tag] debian/2.6.3-3.2+deb9u2 -> debian/2.6.3-3.2+deb9u2
 * [new tag] debian/2.9.1-3+deb10u1 -> debian/2.9.1-3+deb10u1
 * [new tag] debian/2.9.1-3+deb10u2 -> debian/2.9.1-3+deb10u2
Note: switching to '31b669dbb7b420de1d2b8fa16ea360e816ceebc2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 31b669db debian/changelog: Update for FreeType Debian release 2.13.0+dfsg-1
Traceback (most recent call last):
  File "/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 162, in main
    extract_upstream_tarball(
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 71, in extract_upstream_tarball
    subprocess.check_call(
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pristine-tar', 'checkout', '/home/buildd/build-RECIPEBRANCHBUILD-3580935/chroot-autobuild/home/buildd/work/tree/freetype_2.13.0+dfsg.orig.tar.xz']' returned non-zero exit status 2.
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=chroot --series=mantic --arch=amd64 RECIPEBRANCHBUILD-3580935
Scanning for processes to kill in build RECIPEBRANCHBUILD-3580935

Full log: https://launchpadlibrarian.net/679607707/buildlog.txt.gz

Tags: git recipe
no longer affects: launchpad
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.