aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-07-28 16:14:20 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2017-07-28 16:14:45 +0100
commit9d37f61d540b2c036c72e97892c7ae99d406d4c6 (patch)
treeef5a6572761c29d58be0d36f1eb6772fba9bf64a /debian
parentc1ad91803a120db511183e2f9880eee997d55e8d (diff)
Fix upstream version parsing
The sed regex is greedy, so 17.08-rc2-0vyatta1 returns 17.08-rc2. Match everything until the separator instead. Also use dpkg-parsechangelog --show-field Version to simplify it further. It's available since dpkg-dev 17.0 which is in both Ubuntu 14.04 and Debian 8. Change-Id: Ie3ef44b5573d6ee586e8cf291f307c0539976ead Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index cff34ae8..e9e66e39 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
export DH_VERBOSE=1
export DH_OPTIONS=-v
-VERSION := $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: (.*:)?(.*)-(.*)/\2/p')
+VERSION := $(shell dpkg-parsechangelog --show-field Version | sed -nr 's/(.*:)?([^-])(-.*)/\2/p')
DPDK_ABI := $(shell echo $(VERSION) | cut -d '.' -f1-2)
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*