admin: distfiles/file-fetcher.pl - allow repeated md5s
sparky
sparky at pld-linux.org
Tue Mar 13 18:06:33 CET 2007
Author: sparky Date: Tue Mar 13 17:06:33 2007 GMT
Module: admin Tag: HEAD
---- Log message:
- allow repeated md5s
---- Files affected:
admin/distfiles:
file-fetcher.pl (1.41 -> 1.42)
---- Diffs:
================================================================
Index: admin/distfiles/file-fetcher.pl
diff -u admin/distfiles/file-fetcher.pl:1.41 admin/distfiles/file-fetcher.pl:1.42
--- admin/distfiles/file-fetcher.pl:1.41 Mon Dec 18 12:57:40 2006
+++ admin/distfiles/file-fetcher.pl Tue Mar 13 18:06:28 2007
@@ -12,7 +12,7 @@
$df_scp = "plddist\@ep09.pld-linux.org:ftp";
@md5 = ();
-%url = ();
+ at url = ();
$problems = "";
$normal_out = "";
$requester = "";
@@ -40,7 +40,7 @@
# read file from spool, and try unlink it. if cannot unlink -- exit
# sets $requester (email), $problems, @md5 (arrays of md5's)
-# and %url (map from md5 to urls)
+# and @url (map from md5 to urls)
sub read_spool_file()
{
open(F, "< $file") || exit 0;
@@ -63,7 +63,7 @@
/^([a-f0-9]{32})\s+((ftp|http|https|no-url|no-url-copy):\/\/([=\@\?a-z0-9A-Z:\+\~\.\-\/_]|\%[0-9])+)\s*$/
or die "$file: corrupted";
push @md5, $1;
- $url{$1} = $2;
+ push @url, $2;
/\/$/ and die "$file: cannot fetch dir";
}
close(F);
@@ -286,8 +286,8 @@
sub fetch_files()
{
$problems .= "\n\n" if ($problems ne "");
- foreach $md5 (@md5) {
- fetch_file($md5, $url{$md5});
+ foreach $i (0..$#md5) {
+ fetch_file($md5[$i], $url[$i]);
}
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/admin/distfiles/file-fetcher.pl?r1=1.41&r2=1.42&f=u
More information about the pld-cvs-commit
mailing list