215
|
0 |
0 |
0 |
$self->{'tarball'} ||= do {
$self->build;
my $guard = pushd($self->dir);
my $tarball = sprintf("%s-%s.tar.gz", $self->project->dist_name, $self->project->version);
my $force_mode = 0;
my $tar = "Archive::Tar"->new;
foreach my $file (@{$self->manifest_files;}) {
my $filename = "File::Spec"->catfile($self->project->dist_name . "-" . $self->project->version, $file);
my $data = slurp($file);
my $mode = (stat $file)[2];
if ($mode == 33206) {
$mode = 420;
++$force_mode;
};
$tar->add_data($filename, $data, {"mode", $mode});
};
$tar->write($tarball, 9);
infof("Wrote %s\n", $tarball . ($force_mode == 0 ? "" : " --> forced to mode 000664"));
"File::Spec"->rel2abs($tarball)
} |