diff options
author | Norbert Preining <norbert@preining.info> | 2019-08-28 10:42:39 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-10-02 12:33:49 +0900 |
commit | a81740dbc6000c7523cee4b164a1a410535be3d1 (patch) | |
tree | db1c5e1cbeec89256f09e528604da1734ad60155 /Master/tlpkg/TeXLive | |
parent | 863158ec2ac35ea8ee287722f678c3481d8c6f19 (diff) |
TLPOBJ::make_container: generate versioned containers by default
add links in the system case (not for user backup containers)
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 7b00afe5dc2..1b6d17d1e3b 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -631,7 +631,11 @@ sub make_container { $selfcopy->writeout(\*TMP); close(TMP); push(@files, "$tlpobjdir/$self->{'name'}.tlpobj"); - $tarname = "$containername.tar"; + # Switch to versioned containers + # $tarname = "$containername.tar"; + $tarname = "$containername.r" . $self->revision . ".tar"; + my $unversionedtar; + $unversionedtar = "$containername.tar" if (! $user); # start the fun my $tar = $::progs{'tar'}; @@ -720,6 +724,7 @@ sub make_container { # Run tar. Unlink both here in case the container is also plain tar. unlink("$destdir/$tarname"); + unlink("$destdir/$unversionedtar") if (! $user); unlink("$destdir/$containername"); xsystem(@cmdline); @@ -751,6 +756,15 @@ sub make_container { # most strange cases. unlink("$destdir/$tarname") if ((-r "$destdir/$tarname") && (-r "$destdir/$containername")); + # in case of system containers also create the links to the + # versioned containers + if (! $user) { + my $linkname = "$destdir/$unversionedtar.$compressorextension"; + unlink($linkname) if (-r $linkname); + if (!symlink($containername, $linkname)) { + tlwarn("$0: Couldn't generate link $linkname -> $containername?\n"); + } + } } else { tlwarn("$0: Couldn't find $destdir/$tarname to run $compressor\n"); return (0, 0, ""); |