osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/29593 )


Change subject: obs: build_srcpkg_if_needed: switch if branches
......................................................................

obs: build_srcpkg_if_needed: switch if branches

Make it slightly easier to read, before extending the latest branch with
master too in a follow-up patch.

Related: OS#2385
Change-Id: I4f1d4e250eb4d8163f1ded29106a44deb0d0feff
---
M scripts/obs/update_obs_project.py
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/93/29593/1

diff --git a/scripts/obs/update_obs_project.py 
b/scripts/obs/update_obs_project.py
index aa33984..168193d 100755
--- a/scripts/obs/update_obs_project.py
+++ b/scripts/obs/update_obs_project.py
@@ -66,9 +66,9 @@
                            fetch, is_meta_pkg, skip_up_to_date):
     global srcpkgs_skipped

-    if feed != "latest":
-        print(f"{package}: building source package (feed is {feed})")
-    else:
+    if feed == "latest":
+        """ Check if we can skip this package by comparing the OBS version with
+            the git remote. """
         if is_meta_pkg:
             latest_version = conflict_version if conflict_version else "1.0.0"
         else:
@@ -95,6 +95,8 @@
             else:
                 print(f"{package}: building source package (outdated:"
                       f" {latest_version} <=> {obs_version} in OBS)")
+    else:
+        print(f"{package}: building source package (feed is {feed})")

     build_srcpkg(feed, branch, package, conflict_version, fetch, is_meta_pkg)


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29593
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4f1d4e250eb4d8163f1ded29106a44deb0d0feff
Gerrit-Change-Number: 29593
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to