← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master

 

Loïc Minier has proposed merging ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master.

Commit message:
https://code.launchpad.net/~lool/+recipe/linux-nvidia-tegra-sidecar-daily is failing with:
fatal: ambiguous argument '60ab15c3d7a8c92ccfe8fa7f1d650f3f292141a0^{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: 60ab15c3d7a8c92ccfe8fa7f1d650f3f292141a0^{tree}

git-build-recipe only fetches some remote branches (and their tags); this extends the logic to fetch more remote tags that could be pristine-tar related

This recipe then fails to build due to other pristine-tar failures, but that's for another pull request

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lool/git-build-recipe/+git/git-build-recipe/+merge/443942
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lool/git-build-recipe:fetch-pristine-tar-tags into git-build-recipe:master.
diff --git a/gitbuildrecipe/recipe.py b/gitbuildrecipe/recipe.py
index f932ca7..d58a61d 100644
--- a/gitbuildrecipe/recipe.py
+++ b/gitbuildrecipe/recipe.py
@@ -344,6 +344,10 @@ def fetch_branches(child_branch):
     child_branch.git_call(
         "fetch", url,
         "refs/heads/*:refs/remotes/%s/*" % child_branch.remote_name)
+    # Also fetch remote tags that look like pristine-tar upstream tags.
+    child_branch.git_call(
+        "fetch", url,
+        "refs/tags/upstream/*:refs/remotes/%s/*" % child_branch.remote_name)
 
 
 @lru_cache(maxsize=1)

Follow ups