admin: distfiles/file-fetcher.pl - catch some more errors
sparky
sparky at pld-linux.org
Sun Apr 11 13:45:39 CEST 2010
Author: sparky Date: Sun Apr 11 11:45:39 2010 GMT
Module: admin Tag: HEAD
---- Log message:
- catch some more errors
---- Files affected:
admin/distfiles:
file-fetcher.pl (1.52 -> 1.53)
---- Diffs:
================================================================
Index: admin/distfiles/file-fetcher.pl
diff -u admin/distfiles/file-fetcher.pl:1.52 admin/distfiles/file-fetcher.pl:1.53
--- admin/distfiles/file-fetcher.pl:1.52 Tue Apr 6 21:08:50 2010
+++ admin/distfiles/file-fetcher.pl Sun Apr 11 13:45:34 2010
@@ -256,6 +256,11 @@
if ($out ne "") {
$problems .= "$cmd:\n$out\n\n";
}
+ if ( $? ) {
+ $problems .= sprintf "$cmd:\nexited with code %d (0x%02x)\n\n",
+ $? >> 8,
+ $? & 0xff;
+ }
if (-f $local && -s $local == 0 && $url =~ /^ftp:/) {
$out = "";
open(W, "$cmd2 2>&1 |");
@@ -266,7 +271,12 @@
}
close(W);
if ($out ne "") {
- $problems .= "$cmd:\n$out\n\n";
+ $problems .= "$cmd2:\n$out\n\n";
+ }
+ if ( $? ) {
+ $problems .= sprintf "$cmd2:\nexited with code %d (0x%02x)\n\n",
+ $? >> 8,
+ $? & 0xff;
}
}
if (-r $local && -s $local > 0) {
@@ -290,6 +300,8 @@
}
} elsif (-f $local && -s $local > 0) {
$problems .= "FATAL: $url ($md5) was not fetched ($cmd: $all_out): file is not readable\n";
+ } elsif (-f $local && not -s $local) {
+ $problems .= "FATAL: $url ($md5) was not fetched ($cmd: $all_out): file exists but has 0 length\n";
} else {
$problems .= "FATAL: $url ($md5) was not fetched ($cmd: $all_out)\n";
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/admin/distfiles/file-fetcher.pl?r1=1.52&r2=1.53&f=u
More information about the pld-cvs-commit
mailing list