Hi,

On Tue, 13 Dec 2011, Martin Packman wrote:
> See attached patch making the dpkg-mergechangelogs only tolerate bad
> versions, leaving the existing strict handling in Dpkg::Version.

Thanks for the report and the patch. I pushed a fix in git master.
The fix itself is really simple:
--- 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

Of your patch, I only kept the non-regression test:

commit fc372437a25080989c6ab788fe0382ef508739a4
Author: Martin Packman <[email protected]>
Date:   Wed Dec 21 10:14:27 2011 +0100

    dpkg-mergechangelogs: supplementary non-regression test
    
    Add a test that ensures that dpkg-mergechangelogs deals correctly
    with invalid versions.
    
    Signed-off-by: Raphaël Hertzog <[email protected]>

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to