r27318 - /trunk/dh-make-perl/dh-make-perl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Nov 26 21:16:54 UTC 2008


Author: dmn
Date: Wed Nov 26 21:16:51 2008
New Revision: 27318

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27318
Log:
use stricter glob for Contents files, preferring official debian repositories

Modified:
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=27318&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Wed Nov 26 21:16:51 2008
@@ -132,11 +132,12 @@
 
     my $archspec = `dpkg --print-architecture`;
     chomp($archspec);
+    my $contents_glob = "/var/cache/apt/apt-file/*_debian_dists_{unstable,sid}_Contents-$archspec.gz";
 
     # see if the cache is stale
     if ( $cache and $cache->{stamp} and $cache->{contents_files} ) {
         my @contents_files;
-        for ( glob "/var/cache/apt/apt-file/*_Contents-$archspec.gz" ) {
+        for ( glob $contents_glob ) {
             push @contents_files, $_;
             if ( ( stat($_) )[9] > $cache->{stamp} ) {
                 undef($cache);
@@ -159,7 +160,7 @@
         $cache->{stamp}          = time;
         $cache->{contents_files} = [];
         $cache->{apt_contents}   = {};
-        for ( glob "/var/cache/apt/apt-file/*_Contents-$archspec.gz" ) {
+        for ( glob $contents_glob ) {
             push @{ $cache->{contents_files} }, $_;
             my $f         = IO::Uncompress::Gunzip->new($_);
             my $capturing = 0;




More information about the Pkg-perl-cvs-commits mailing list