diff mbox series

[REVIEW,2/4,linux-meta] UBUNTU: [Debian] Simplify getting kernel version and abi

Message ID 20191203222657.1152249-16-seth.forshee@canonical.com
State New
Headers show
Series None | expand

Commit Message

Seth Forshee Dec. 3, 2019, 10:26 p.m. UTC
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 debian/rules | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

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 \