diff options
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLCrypto.pm | 16 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 11 |
2 files changed, 20 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm index 7716f9eb292..29e7a2c5a41 100644 --- a/Master/tlpkg/TeXLive/TLCrypto.pm +++ b/Master/tlpkg/TeXLive/TLCrypto.pm @@ -68,6 +68,11 @@ Returns the checksum method or undef if none found. =cut sub setup_checksum_method { + # make it a noop if already defined + # the checksum method could also be "" meaning that there + # is none. We do not need to check again. Thus we check + # on defined. + return ($::checksum_method) if defined($::checksum_method); # default is no checksum $::checksum_method = ""; # for debugging @@ -122,11 +127,12 @@ Return checksum of C<$file>. sub tlchecksum { my ($file) = @_; - # no reason to have this here - # if (!$::checksum_method) { - # setup_checksum_method(); - # } - return "" if (!$::checksum_method); + # this is here for the case that a script forgets to + # set up the checksum method! + if (!$::checksum_method) { + setup_checksum_method(); + } + tldie("no checksum method available\n") if (!$::checksum_method); if (-r $file) { my ($out, $ret); if ($::checksum_method eq "openssl") { diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 5830be6ae9a..91a06c32a29 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -602,8 +602,9 @@ sub make_container { # overflow standard tar format and result in special things being # done. We don't want the GNU-specific special things. # + my $is_sys_container = ( $containername =~ /\.r[0-9]/ ); my @attrs - = $containername =~ /\.r[0-9]/ + = $is_sys_container ? () : ( "--owner", "0", "--group", "0", "--exclude", ".svn", "--format", "ustar" ); @@ -683,7 +684,13 @@ sub make_container { return (0, 0, ""); } my $size = (stat "$destdir/$containername") [7]; - my $checksum = TeXLive::TLCrypto::tlchecksum("$destdir/$containername"); + # + # if we are creating a system container, or there is a way to + # compute the checksums, do it + my $checksum = ""; + if ($is_sys_container || $::checksum_method) { + $checksum = TeXLive::TLCrypto::tlchecksum("$destdir/$containername"); + } # cleaning up unlink("$tlpobjdir/$self->{'name'}.tlpobj"); |