summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2016-04-17 21:37:08 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2016-04-17 21:37:08 +0000
commit6fac298120bb00db8b66181bc0d2a8f7bfd04ae0 (patch)
treef658f0d1b2ad5f3776db0737cf547da0194aa13f
parent7a0f7465f8b6477162a651ca785541070f716ede (diff)
Fix for w32 UNC installs
git-svn-id: svn://tug.org/texlive/trunk@40581 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/fmtutil.pl14
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl
index 76005cf1211..6aeaf0fc8cc 100755
--- a/Master/texmf-dist/scripts/texlive/fmtutil.pl
+++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl
@@ -37,6 +37,7 @@ use strict;
use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
use File::Basename;
use File::Copy;
+use File::Spec;
use Cwd;
# don't import anything automatically, this requires us to explicitly
@@ -44,6 +45,8 @@ use Cwd;
# find and if necessary remove references to TLUtils
use TeXLive::TLUtils qw();
+require TeXLive::TLWinGoo if TeXLive::TLUtils::win32;
+
# numerical constants
my $FMT_NOTSELECTED = 0;
my $FMT_DISABLED = 1;
@@ -321,8 +324,11 @@ sub callback_build_formats {
my $tmpdir;
if (win32()) {
my $foo;
+ my $tmp_deflt = File::Spec->tmpdir;
for my $i (1..5) {
- $foo = "$texmfvar/temp.$$." . int(rand(1000000));
+ # $foo = "$texmfvar/temp.$$." . int(rand(1000000));
+ $foo = (($texmfvar =~ m!^//!) ? $tmp_deflt : $texmfvar)
+ . "/temp.$$." . int(rand(1000000));
if (! -d $foo) {
if (mkdir($foo)) {
$tmpdir = $foo;
@@ -333,6 +339,10 @@ sub callback_build_formats {
if (! $tmpdir) {
die "Cannot get a temporary directory after five iterations ... sorry!";
}
+ if ($texmfvar =~ m!^//!) {
+ # used File::Spec->tmpdir; fix permissions
+ TeXLive::TLWinGoo::maybe_make_ro ($tmpdir);
+ }
} else {
$tmpdir = File::Temp::tempdir(CLEANUP => 1);
}
@@ -349,7 +359,7 @@ sub callback_build_formats {
# for safety, check again
die "abs_path failed, strange: $!" if !$opts{'fmtdir'};
print_info("writing formats under $opts{fmtdir}\n"); # report
-
+
# code taken over from the original shell script for KPSE_DOT etc
my $thisdir = cwd();
$ENV{'KPSE_DOT'} = $thisdir;