my ($tarball, $manifest) = @ARGV;
my $type
- = $tarball =~ /\.bz2$/ ? 'j'
- : $tarball =~ /\.xz$/ ? 'J'
- : $tarball =~ /\.t?gz$/ ? 'z'
- : $tarball =~ /\.Z$/ ? 'Z'
+ = $tarball =~ /\.bz2$/ ? '-j'
+ : $tarball =~ /\.xz$/ ? '-J'
+ : $tarball =~ /\.t?gz$/ ? '-z'
+ : $tarball =~ /\.Z$/ ? '-Z'
: '';
my @tarfiles;
{
my $null = File::Spec->devnull;
- @tarfiles = `$tar -t -$type -f $tarball 2>$null`;
+ @tarfiles = `$tar -t $type -f "$tarball" 2>$null`;
chomp @tarfiles;
}
if (@missing) {
$message .= "$tarball is missing files:\n" . join '', map " $_\n", @missing;
}
-die $message
- if $message;
+if ($message) {
+ die $message . <<'END_MESSAGE';
+
+This may happen if the file attributes are not compatible with the ustar format.
+END_MESSAGE
+}
exit 0;