[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#818700: allow non-numerical suffixes in version numbers

Package: kfreebsd-10
Version: 10.3~svn296373-2


The regex used by get-orig-source target in debian/rules to
parse package version doesn't allow for anything other than
numbers to be present after the last '-' character.

However it's common in Ubuntu to use ubuntuX suffixes. Also
ubuntuBSD uses +bsdX.

I'm attaching a patch to improve the regex.

Jon Boden

ubuntuBSD -- Unix for human beings

https://www.ubuntubsd.org/ -- https://twitter.com/ubuntuBSD
diff -Nur debian.old/rules debian/rules
--- debian.old/rules	2015-02-25 14:25:53.000000000 -0500
+++ debian/rules	2015-12-24 13:06:48.000000000 -0500
@@ -13,7 +13,7 @@
 source		:= $(shell dpkg-parsechangelog | grep ^Source: | sed -e 's/^.*: //g')
 full_version	:= $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
 tar_version	:= $(shell echo $(full_version) | sed -e 's/-.*//g')
-svn_revision	:= $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)-[0-9]*/\1/g' -e 's/^$(full_version)$$/HEAD/g')
+svn_revision	:= $(shell echo $(full_version) | sed -e 's/.*~svn\([0-9]*\)-[0-9]\+.*/\1/g' -e 's/^$(full_version)$$/HEAD/g')
 version		:= $(shell echo $(full_version) | sed -e 's/[~+-].*//g')
 major           := $(shell echo $(version) | sed -e 's/\..*//g')
 revision	:= $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')

Reply to: