git-build-recipe crashes

Bug #1538651 reported by Rod Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-build-recipe
Triaged
High
Unassigned

Bug Description

I'm trying to test build recipes for git projects, as per http://blog.launchpad.net/cool-new-stuff/beta-test-git-recipes and https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted. My recipe (certification-docs.recipe) is:

# git-build-recipe format 0.3 deb-version {debupstream}-0~{revno}
lp:certification-docs

The result when I try running it is:

$ git-build-recipe --allow-fallback-to-native certification-docs.recipe working-dir
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 300, in git_clone
    cmd, stderr=subprocess.STDOUT, universal_newlines=True)
  File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['git', '-c', 'url.https://git.launchpad.net/.insteadOf=lp:', 'clone', '-n', 'lp:certification-docs', 'working-dir/certification-docs']' returned non-zero exit status 128

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/git-build-recipe", line 9, 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 484, in build_tree
    _build_inner_tree(base_branch, target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 405, in _build_inner_tree
    pull_or_clone(base_branch, target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 329, in pull_or_clone
    git_clone(base_branch.url, target_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/recipe.py", line 303, in git_clone
    raise CloneFailed(e.output)
gitbuildrecipe.recipe.CloneFailed: git clone failed:
Cloning into 'working-dir/certification-docs'...
fatal: No path specified. See 'man git-pull' for valid url syntax

This may well be a case of improper use (command line or .recipe file), but the Python crash dump isn't exactly a model of clarity. If this is an improper-use case, could it be detected and a helpful error message produced instead?

Colin Watson (cjwatson)
affects: launchpad → git-build-recipe
Revision history for this message
Colin Watson (cjwatson) wrote :

At present it is not in general possible to build from a private repository on Launchpad using git-build-recipe. This won't be possible until we have HTTPS access tokens for private repositories (as it happens I'm working on prerequisites for that right now, but it will take a while). You can do it locally by using git+ssh://git.launchpad.net/certification-docs rather than lp:certification-docs, but it isn't going to work as part of a recipe build on Launchpad for a while yet.

I agree that the error message lacks a certain something, and will see what I can do to improve that.

Changed in git-build-recipe:
status: New → Triaged
importance: Undecided → High
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.