Change in osmo-ci[master]: OBS: support more than one conflicting package

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Thu May 28 10:01:23 UTC 2020


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/18441 )

Change subject: OBS: support more than one conflicting package
......................................................................

OBS: support more than one conflicting package

For the upcoming network:osmocom:next repository, it would be
inconsistent to have the debian package conflict mechanism only support
latest and nightly, even if the next repository is currently not built
for debian.

Change-Id: I2c07313fbbdffe5571e447059b08fe74c853cef0
---
M scripts/common-obs.sh
1 file changed, 22 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  osmith: Verified



diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 137887b..3aa2a36 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -26,17 +26,17 @@
 #     └── source
 #         └── format
 # $1: name of dummy package (e.g. "osmocom-nightly")
-# $2: name of conflicting package (e.g. "osmocom-latest")
+# $2-*: name of conflicting packages (e.g. "osmocom-latest")
 osmo_obs_prepare_conflict() {
 	local pkgname="$1"
-	local pkgname_conflict="$2"
+	shift
 	local pkgver="0.0.0"
 	local oldpwd="$PWD"
 
 	mkdir -p "$pkgname/debian/source"
 	cd "$pkgname/debian"
 
-	# Fill control, changelog, rules
+	# Fill control
 	cat << EOF > control
 Source: ${pkgname}
 Section: unknown
@@ -48,16 +48,32 @@
 Package: ${pkgname}
 Depends: \${misc:Depends}
 Architecture: any
-Conflicts: ${pkgname_conflict}
-Description: Dummy package, which conflicts with ${pkgname_conflict}
 EOF
+	printf "Conflicts: " >> control
+	first=1
+	for i in "$@"; do
+		if [ "$first" -eq 1 ]; then
+			first=0
+		else
+			printf ", " >> control
+		fi
+		printf "%s" "$i" >> control
+	done
+	printf "\n" >> control
+	cat << EOF >> control
+Description: Dummy package, which conflicts with: $@
+EOF
+
+	# Fill changelog
 	cat << EOF > changelog
 ${pkgname} (${pkgver}) unstable; urgency=medium
 
-  * Dummy package, which conflicts with ${pkgname_conflict}.
+  * Dummy package, which conflicts with: $@
 
  -- Oliver Smith <osmith at sysmocom.de>  Thu, 13 Jun 2019 12:50:19 +0200
 EOF
+
+	# Fill rules
 	cat << EOF > rules
 #!/usr/bin/make -f
 %:

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I2c07313fbbdffe5571e447059b08fe74c853cef0
Gerrit-Change-Number: 18441
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200528/429228c9/attachment.htm>


More information about the gerrit-log mailing list