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


Change subject: obs: add --conflict-pkgname arg
......................................................................

obs: add --conflict-pkgname arg

Prepare to create new feeds for the rhizomatica/testing and
rhizomatica/production branches, which will be based on osmocom:latest.
They will have osmocom-latest as conflict package even though their
feed name is not latest.

Related: OS#5981
Change-Id: I58e33bb003e2a4af9e9a7b53e5f79a91c3b541eb
---
M scripts/obs/lib/__init__.py
M scripts/obs/lib/metapkg.py
M scripts/obs/lib/srcpkg.py
3 files changed, 20 insertions(+), 2 deletions(-)



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

diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py
index 9682b19..842dd41 100644
--- a/scripts/obs/lib/__init__.py
+++ b/scripts/obs/lib/__init__.py
@@ -60,6 +60,9 @@
                              " 20YYqX packages to ensure they are not mixed"
                              " from different build dates (ABI compatibility"
                              " is only on latest).")
+    parser.add_argument("-p", "--conflict-pkgname", nargs="?",
+                        help="name of the meta-package to depend on (default:"
+                             " osmocom-$feed)")
     parser.add_argument("-v", "--verbose", action="store_true",
                         help="always print shell commands and their output,"
                              " instead of only printing them on error")
diff --git a/scripts/obs/lib/metapkg.py b/scripts/obs/lib/metapkg.py
index 847a56b..38ed930 100644
--- a/scripts/obs/lib/metapkg.py
+++ b/scripts/obs/lib/metapkg.py
@@ -87,7 +87,7 @@

 def build():
     feed = lib.args.feed
-    pkgname = f"osmocom-{feed}"
+    pkgname = lib.args.conflict_pkgname or f"osmocom-{feed}"
     conflict_version = lib.args.conflict_version
     version = conflict_version if conflict_version else "1.0.0"
     print(f"{pkgname}: generating meta package {version}")
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index a58ae15..2751005 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -157,7 +157,7 @@
     write_tarball_version(project, version_epoch)

     if project in lib.config.projects_osmocom:
-        metapkg = f"osmocom-{feed}"
+        metapkg = lib.args.conflict_pkgname or f"osmocom-{feed}"
         lib.debian.control_add_depend(project, metapkg, conflict_version)
         if has_rpm_spec:
             lib.rpm_spec.add_depend(project, metapkg, conflict_version)

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

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

Reply via email to