r11498 - /scripts/qa/DebianQA/Watch.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Sun Dec 23 10:41:25 UTC 2007
Author: tincho-guest
Date: Sun Dec 23 10:41:25 2007
New Revision: 11498
URL: http://svn.debian.org/wsvn/?sc=1&rev=11498
Log:
Going back to ls-lR.
I. HATE. CPAN.
Modified:
scripts/qa/DebianQA/Watch.pm
Modified: scripts/qa/DebianQA/Watch.pm
URL: http://svn.debian.org/wsvn/scripts/qa/DebianQA/Watch.pm?rev=11498&op=diff
==============================================================================
--- scripts/qa/DebianQA/Watch.pm (original)
+++ scripts/qa/DebianQA/Watch.pm Sun Dec 23 10:41:25 2007
@@ -391,7 +391,7 @@
}
}
- my $url = $CFG{watch}{cpan_mirror} . "/indices/find-ls.gz";
+ my $url = $CFG{watch}{cpan_mirror} . "/indices/ls-lR.gz";
info("Rebuilding CPAN indices cache from $url");
open(TMP, "+>", undef) or die $!;
my $res = $ua->get($url, ":content_cb" => sub {
@@ -418,14 +418,23 @@
seek($data, 0, SEEK_SET) or die "Can't seek: $!\n";
+ my $cpan = {};
my($dir, $type);
- my $cpan = {};
while(<$data>) {
chomp;
+ if(/^(.+):$/) {
+ my $subdir = $1;
+ $type = undef;
+ $subdir =~ m{/.*(authors/id|modules/by-module)/+(.*?)/*$} or next;
+ $dir = $2;
+ $1 =~ /(authors|modules)/ and $type = $1;
+ next;
+ }
+ next unless($type and /^[-l]r.....r/);
+ s/ -> .*//;
my $file = (split)[8];
- $file =~ m{^(authors|modules)/(?:id|by-module)/(.*)/(.*\.(?:bz2|gz|zip|pl|pm|tar|tgz))$}i or next;
- my($type, $dir, $tarball) = ($1, $2, $3);
- $cpan->{$type}{$dir}{$tarball} = 1;
+ $file =~ m{\.(?:bz2|gz|zip|pl|pm|tar|tgz)$}i or next;
+ $cpan->{$type}{$dir}{$file} = 1;
}
close $data;
update_cache("cpan_index", $cpan, "", 1);
More information about the Pkg-perl-cvs-commits
mailing list