Change in osmo-ci[master]: OBS: conflict: move common code from _deb to main

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
Fri Jan 15 15:54:07 UTC 2021


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


Change subject: OBS: conflict: move common code from _deb to main
......................................................................

OBS: conflict: move common code from _deb to main

Move logic to create the package directory, change into it, and to put
the directory into a git repository and tag it with the package version,
into the common function. Again, in preparation to add a _rpm function.

Related: OS#4733
Change-Id: I3066147ef5469cce9d269b119d9ffa3e53f00403
---
M scripts/common-obs-conflict.sh
1 file changed, 24 insertions(+), 18 deletions(-)



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

diff --git a/scripts/common-obs-conflict.sh b/scripts/common-obs-conflict.sh
index ec877a1..ecd21c7 100644
--- a/scripts/common-obs-conflict.sh
+++ b/scripts/common-obs-conflict.sh
@@ -10,22 +10,21 @@
 # $2-*: name of conflicting packages (e.g. "osmocom-latest")
 #
 # Generates the following directory structure:
-#   osmocom-nightly
-#   └── debian
-#       ├── changelog
-#       ├── compat
-#       ├── control
-#       ├── copyright
-#       ├── rules
-#       └── source
-#           └── format
+#   debian
+#   ├── changelog
+#   ├── compat
+#   ├── control
+#   ├── copyright
+#   ├── rules
+#   └── source
+#       └── format
 osmo_obs_prepare_conflict_deb() {
 	local pkgname="$1"
 	shift
 	local oldpwd="$PWD"
 
-	mkdir -p "$pkgname/debian/source"
-	cd "$pkgname/debian"
+	mkdir -p "debian/source"
+	cd "debian"
 
 	# Fill control
 	cat << EOF > control
@@ -77,13 +76,6 @@
 	echo "3.0 (native)" > source/format
 	touch copyright
 
-	# Put in git repository
-	cd ..
-	git init .
-	git add -A
-	git commit -m "auto-commit: $pkgname dummy package" || true
-	git tag -f "$OSMO_OBS_CONFLICT_PKGVER"
-
 	cd "$oldpwd"
 }
 
@@ -91,5 +83,19 @@
 # $1: name of dummy package (e.g. "osmocom-nightly")
 # $2-*: name of conflicting packages (e.g. "osmocom-latest")
 osmo_obs_prepare_conflict() {
+	local pkgname="$1"
+	local oldpwd="$PWD"
+
+	mkdir -p "$pkgname"
+	cd "$pkgname"
+
 	osmo_obs_prepare_conflict_deb "$@"
+
+	# Put in git repository
+	git init .
+	git add -A
+	git commit -m "auto-commit: $pkgname dummy package" || true
+	git tag -f "$OSMO_OBS_CONFLICT_PKGVER"
+
+	cd "$oldpwd"
 }

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I3066147ef5469cce9d269b119d9ffa3e53f00403
Gerrit-Change-Number: 22216
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210115/bbd1b678/attachment.htm>


More information about the gerrit-log mailing list