From 3a41a4c1b8831bc7ce7257c19bee755c651776a5 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 17 Aug 2022 15:55:06 +0200 Subject: 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 --- scripts/obs/lib/srcpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- cgit v1.2.3