Author: jfs
Date: Tue Jul  3 23:22:26 2012
New Revision: 9248

URL: http://svn.debian.org/wsvn/?sc=1&rev=9248
Log:

Apply patch provided by [email protected], this fixes a problem that
makes the extractor skip packages with epoched version numbers, or more
generally packages where the version number in the filename (used by
manpage-extractor.pl) doesn't match the Version field in the Package            
                 
file (used by files-release.pl).

This fix uses dpkg-deb to read the Version field out
of the package.


Modified:
    man-cgi/extractor/manpage-extractor.pl

Modified: man-cgi/extractor/manpage-extractor.pl
URL: 
http://svn.debian.org/wsvn/man-cgi/extractor/manpage-extractor.pl?rev=9248&op=diff
==============================================================================
--- man-cgi/extractor/manpage-extractor.pl (original)
+++ man-cgi/extractor/manpage-extractor.pl Tue Jul  3 23:22:26 2012
@@ -128,9 +128,9 @@
        $packagename =~ s/_.*//; # Trim the values to obtain the packagename
        my $version = "undefined";
        my $arch = "undefined";
-       if ( $EXTENSION eq "deb" and $debfile =~ 
/^.*?_(.*?)_([\w\-]+)\.$EXTENSION$/ ) {
-               $version = $1;
-               $arch = $2;
+        if ( $EXTENSION eq "deb" ) {                                           
                     
+            chomp ( $version = `dpkg-deb -f "$file" Version` );
+            chomp ( $arch = `dpkg-deb -f "$file" Architecture` );
        } 
        if ( defined($opt_a) and $arch ne $opt_a ) {
                print "Skipping package $packagename (architecture '$arch')\n";


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to