[PATCH 4/4] UBUNTU: [Packaging] update-version -- allow specification of the master version
Andy Whitcroft
apw at canonical.com
Wed Jul 21 22:13:38 UTC 2021
Allow the caller to supply the master version so we do not need to go
look for it in the primary kernel. This is used during LRM only
respins.
BugLink: https://bugs.launchpad.net/bugs/1928921
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
update-version | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/update-version b/update-version
index 82794e8..cc55c39 100755
--- a/update-version
+++ b/update-version
@@ -6,6 +6,8 @@ tag_prefix=`dpkg-parsechangelog -S Source | sed 's/linux-restricted-modules/Ubun
commit=:
no_update=false
+master_version=
+master_dir=
while :
do
if [ "$1" = "--commit" ]; then
@@ -16,25 +18,33 @@ do
shift
no_update=true
+ elif [ "$1" = "--master-version" ]; then
+ master_version="$2"
+ shift 2
+
else
break
fi
done
-if [ "$#" -ne 1 ]; then
- echo "Usage: $0 <linux-source-directory>" 1>&2
- exit 1
-fi
-master_dir="$1"
+if [ "$master_version" = "" ]; then
+ if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <linux-source-directory>" 1>&2
+ exit 1
+ fi
+ master_dir="$1"
-# Work out the master kernel version.
-if [ -f "$master_dir/debian/debian.env" ]; then
- branch=`sed -ne 's/DEBIAN=//p' <"$master_dir/debian/debian.env"`
- changelog="-l$branch/changelog"
+ # Work out the master kernel version.
+ if [ -f "$master_dir/debian/debian.env" ]; then
+ branch=`sed -ne 's/DEBIAN=//p' <"$master_dir/debian/debian.env"`
+ changelog="-l$branch/changelog"
+ else
+ changelog=""
+ fi
+ master_version=`(cd "$master_dir" && LC_ALL=C dpkg-parsechangelog -SVersion $changelog)`
else
- changelog=""
+ no_update=true
fi
-master_version=`(cd "$master_dir" && LC_ALL=C dpkg-parsechangelog -S Version $changelog)`
# Work out our current version taking into account closed sections.
here_series=$( LC_ALL=C dpkg-parsechangelog -S Distribution )
--
2.31.1
More information about the kernel-team
mailing list