diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2011-12-21 10:02:36 +0100 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2011-12-21 10:02:36 +0100 |
commit | 834f83e490eb1c2907adf67a2b43a04ccd900b9e (patch) | |
tree | 8f6d55fa6e288b6c83333e89c24f6136b04d804b /scripts/dpkg-mergechangelogs.pl | |
parent | 66a76d5abbc8dce24296108d109a96e7affad7cc (diff) | |
download | dpkg-834f83e490eb1c2907adf67a2b43a04ccd900b9e.tar.gz |
dpkg-mergechangelogs: do not error out on invalid versions
The usage of version_compare() has the side effect of erroring out as
soon as you encounter an invalid version. Replacing this call
with a comparison operator invoked on Dpkg::Version objects fixes
the issue.
Closes: #651993
Reported-by: Martin Packman <martin.packman@canonical.com>
Diffstat (limited to 'scripts/dpkg-mergechangelogs.pl')
-rwxr-xr-x | scripts/dpkg-mergechangelogs.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl index a3ddeec61..1729368c7 100755 --- a/scripts/dpkg-mergechangelogs.pl +++ b/scripts/dpkg-mergechangelogs.pl @@ -179,7 +179,9 @@ sub compare_versions { $a =~ s/~[^~]*$//; $b =~ s/~[^~]*$//; } - return version_compare($a, $b); + $a = Dpkg::Version->new($a); + $b = Dpkg::Version->new($b); + return $a <=> $b; } # Merge changelog entries smartly by merging individually the different |