summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-12-24 19:10:40 +0000
committerKarl Berry <karl@freefriends.org>2008-12-24 19:10:40 +0000
commit88df293243a8c9c3b5a1e72591a6e44075188c2e (patch)
tree378728ac94c62b5cbb35fa7587d7104df57c887f /Master/tlpkg/TeXLive
parent6070138b8302525b8ccbe8fa61c37155115f5526 (diff)
* TLPOBJ.pm (make_container): can't use command line on Windows, argv
space is too small. Use -T, since we have our own tar. Mail from Dan Luecking, 24 Dec 2008 02:13:18 (et al.). git-svn-id: svn://tug.org/texlive/trunk@11704 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm3
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm31
2 files changed, 25 insertions, 9 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index b65eef1d5e7..e4ac88bf4ef 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -927,8 +927,7 @@ and info files as specified by the options saved in the tlpdb
$tlpdb->option_sys_man, $tlpdb->option_sys_info).
The functions return 1 on success and 0 on error.
-
-On win32 it returns undefined;
+On Windows it returns undefined.
=cut
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index d36c2b1ea26..7a9ac657fbe 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -509,20 +509,36 @@ sub make_container {
? () : ("--owner", "0", "--group", "0");
my @cmdline = ($tar, "-cf", "$destdir/$tarname", @attrs);
- # Get list of files. We have to pass them all on the command line,
- # because there is no portable way to pass them on stdin. This can be
- # a lengthy command line, but modern systems have enough argv space.
- # our biggest package is tex4ht, which needs about 200k.
+ # Get list of files and symlinks to back up. Nothing else should be
+ # in the list.
+ my @files_to_backup = ();
for my $f (@files) {
if (-f $f || -l $f) {
- push(@cmdline, $f);
+ push(@files_to_backup, $f);
} else {
tlwarn("$0: (make_container $containername) $f not file or symlink\n");
}
}
+
+ my $tartempfile = "";
+ if (win32()) {
+ # Since we provide our own (GNU) tar on Windows, we know it has -T.
+ my $tmpdir = TeXLive::TLUtils::get_system_tmpdir();
+ $tartempfile = "$tmpdir/mc$$";
+ open(TMP, ">$tartempfile") || die "open(>$tartempfile) failed: $!";
+ print TMP map { "$_\n" } @files_to_backup;
+ close(TMP) || warn "close(>$tartempfile) failed: $!";
+ push(@cmdline, "-T", $tartempfile);
+ } else {
+ # For Unix, we pass all the files on the command line, because there
+ # is no portable (across different platforms and different tars) way
+ # to pass them on stdin. This can be a lengthy command line, but
+ # modern systems have enough argv space -- our biggest package is
+ # tex4ht, which needs about 200k.
+ push(@cmdline, @files_to_backup);
+ }
- # create tar file.
- # unlink both here in case the container is also the plain tar.
+ # Run tar. Unlink both here in case the container is also plain tar.
unlink("$destdir/$tarname");
unlink("$destdir/$containername");
xsystem(@cmdline);
@@ -548,6 +564,7 @@ sub make_container {
# cleaning up
unlink("$tlpobjdir/$self->{'name'}.tlpobj");
rmdir($tlpobjdir) if $removetlpobjdir;
+ rmdir($tartempfile) if $tartempfile;
xchdir($cwd);
debug(" done $containername, size $size, $md5\n");