package version parser now works with native packages

This commit is contained in:
Dima Kogan 2011-11-11 00:12:35 -08:00
parent 15a150b4bb
commit 7d92690136

View File

@ -6,11 +6,11 @@ sub parseversion
{
# grab the version number from the debian changelog file. I look for lines line
#
# libpackage-perl (0.02-1) unstable; urgency=low
# libpackage-perl (0.02) unstable; urgency=low
#
# I parse out the 0.02 part
open DCH, 'debian/changelog' or die "Couldn't open debian/changelog";
my ($version) = <DCH> =~ /^\S+ \s* \( ([0-9\.]+) - \w+ \)/x
my ($version) = <DCH> =~ /^\S+ \s* \( ([0-9\.]+) \)/x
or die "Couldn't parse version from debian/changelog";
close DCH;