[REVIEW 2/4][linux-meta] UBUNTU: [Debian] Simplify getting kernel version and abi
Seth Forshee
seth.forshee at canonical.com
Tue Dec 3 22:26:49 UTC 2019
Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
---
debian/rules | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index 77225d74ad17..9ddcb3bb5f91 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,9 +16,8 @@ SOURCE=$(shell dpkg-parsechangelog | sed -ne 's/^Source: *//p')
SUFFIX=$(shell dpkg-parsechangelog | sed -ne 's/^Source: *linux-meta-lts/-lts/p')
# 5 digit versions (2.6.38.<abi>.<upload>, 3 digit kernel base versions (2.6.38)
-KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \
- 's/Version: \([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1/')
-KERNEL_ABI=$(shell head -n1 < debian/changelog | gawk '{n=split($$0,v,"."); print v[4];}')
+KERNEL_VERSION=$(shell dpkg-parsechangelog -SVersion | cut -d. -f1-3)
+KERNEL_ABI=$(shell dpkg-parsechangelog -SVersion | cut -d. -f4)
# 4 digit versions (3.0.<abi>.<upload>), 2 digit kernel base versions (3.0)
#KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \
--
2.24.0
More information about the kernel-team
mailing list