diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm index 972df6ca06f..708a5794f34 100644 --- a/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm +++ b/Master/tlpkg/tlperl/lib/CPAN/Tarzip.pm @@ -343,10 +343,20 @@ Can't continue cutting file '$file'. } $system = qq{$tarcommand x${tar_verb}f "$file"}; $CPAN::Frontend->myprint(qq{Using Tar:$system:\n}); - if (system($system)==0) { + my $ret = system($system); + if ($ret==0) { $CPAN::Frontend->myprint(qq{Untarred $file successfully\n}); } else { - $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n}); + if ($? == -1) { + $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: '%s'\n}, + $file, $!); + } elsif ($? & 127) { + $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child died with signal %d, %s coredump\n}, + $file, ($? & 127), ($? & 128) ? 'with' : 'without'); + } else { + $CPAN::Frontend->mydie(sprintf qq{Couldn\'t untar %s: child exited with value %d\n}, + $file, $? >> 8); + } } return 1; } else { @@ -450,6 +460,10 @@ END __END__ +=head1 NAME + +CPAN::Tarzip - internal handling of tar archives for CPAN.pm + =head1 LICENSE This program is free software; you can redistribute it and/or |