aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-08-17 15:55:06 +0200
committerosmith <osmith@sysmocom.de>2022-08-18 13:18:25 +0000
commit3a41a4c1b8831bc7ce7257c19bee755c651776a5 (patch)
tree8d91e39bcf512c01e8e16bacac883a1e00373c85
parentdbd1e02ca327b68c76dc9142731845c8bc5a65a3 (diff)
obs: checkout_for_feed + fetch: fix for 2022q1 etc
As Neels pointed out, with the current code the 2022q1 and similar feeds do not get checked out properly if: * the repository was not freshly cloned (like jenkins would do) * the repository was fetched (--git-fetch) Instead of the last revision of that branch from origin, we get the revision that was previously checked out on the branch. Fix this by prepending origin/. Change-Id: I2e265fc84abd4596c386bb56cbabb2af121dc7ca
-rw-r--r--scripts/obs/lib/srcpkg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index ec29581..92c3aa7 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -16,7 +16,7 @@ def checkout_for_feed(project, feed, branch=None):
elif feed == "nightly":
lib.git.checkout_default_branch(project)
else: # 2022q1 etc
- lib.git.checkout(project, feed)
+ lib.git.checkout(project, f"origin/{feed}")
def get_git_version_gen_path(project):