diff options
author | Oliver Smith <osmith@sysmocom.de> | 2020-05-25 11:25:03 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2020-05-28 09:34:16 +0200 |
commit | dfc0b4c74c075880351a6bf5ac8ac92ca30c8293 (patch) | |
tree | a725024699b5da2417a7ea5a1cb41b57ea3a2589 | |
parent | ec04994c10de2a33dae548407cb7556285561d69 (diff) |
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
-rw-r--r-- | scripts/common-obs.sh | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh index 137887b..6b41886 100644 --- a/scripts/common-obs.sh +++ b/scripts/common-obs.sh @@ -26,10 +26,10 @@ osmo_cmd_require \ # └── 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" @@ -48,13 +48,24 @@ Standards-Version: 3.9.8 Package: ${pkgname} Depends: \${misc:Depends} Architecture: any -Conflicts: ${pkgname_conflict} -Description: Dummy package, which conflicts with ${pkgname_conflict} +EOF + printf "Conflicts: " >> control + first=0 + for i in "$@"; do + if [ "$first" -eq 0 ]; then + first=1 + else + printf ", " + fi + printf "%s" "$i" >> control + done + cat << EOF >> control +Description: Dummy package, which conflicts with: $@ EOF cat << EOF > changelog ${pkgname} (${pkgver}) unstable; urgency=medium - * Dummy package, which conflicts with ${pkgname_conflict}. + * Dummy package, which conflicts with: $@ -- Oliver Smith <osmith@sysmocom.de> Thu, 13 Jun 2019 12:50:19 +0200 EOF |