diff mbox series

[bionic/master,1/2] UBUNTU: [Packaging] update-version -- add dkms-versions data to sync list

Message ID 20200619104242.285201-5-apw@canonical.com
State New
Headers show
Series [bionic/master,1/2] UBUNTU: [Packaging] update-version -- add dkms-versions data to sync list | expand

Commit Message

Andy Whitcroft June 19, 2020, 10:42 a.m. UTC
In order to add versioned provides we will need to know the versions of
the carried dkms packages.  Copy this over from the main package.

BugLink: https://bugs.launchpad.net/bugs/1861284
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 update-version | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/update-version b/update-version
index 6df131e..7d2ba25 100755
--- a/update-version
+++ b/update-version
@@ -34,6 +34,31 @@  if [ "$count" != 1 ]; then
 	exit 1
 fi
 
+# Update things from the primary package.
+for thing in \
+	debian/dkms-versions \
+	debian/scripts/misc/git-ubuntu-log
+do
+	from="$master_dir/$thing"
+	to="$thing"
+
+	if [ -f "$from" ]; then
+		cp -p "$from" "$to" || exit 1
+		git add "$to" || exit 1
+	else
+		rm -f "$to"
+		git rm --ignore-unmatch "$to" || exit 1
+	fi
+	if ! git diff --exit-code HEAD -- "$thing" >/dev/null; then
+		msg="UBUNTU: [Packaging] resync $thing from main package
+
+BugLink: http://bugs.launchpad.net/bugs/1786013"
+		git commit -m "$msg" -s -- "$thing"
+	else
+		echo "$thing: no changes from master"
+	fi
+done
+
 # We need to ensure the ABI number matches our master source.
 # extract both for comparison.
 here_abi=${here_version%.*}