summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl5
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm22
2 files changed, 18 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 45d8d0b0688..3f334b1cc1a 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -681,7 +681,6 @@ sub handle_execute_actions
chomp(my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
chomp(my $TEXMFDIST = `kpsewhich -var-value=TEXMFDIST`);
- #
# maps handling
{
my $updmap_run_needed = 0;
@@ -691,8 +690,9 @@ sub handle_execute_actions
for my $m (keys %{$::execute_actions{'disable'}{'maps'}}) {
$updmap_run_needed = 1;
}
+ my $dest = $opts{"usermode"} ? "$::maintree/web2c/updmap.cfg"
+ : "$TEXMFDIST/web2c/updmap.cfg";
if ($updmap_run_needed) {
- my $dest = "$TEXMFDIST/web2c/updmap.cfg";
TeXLive::TLUtils::create_updmap($localtlpdb, $dest);
}
$errors += do_cmd_and_check("updmap$sysmode") if $updmap_run_needed;
@@ -702,7 +702,6 @@ sub handle_execute_actions
# we first have to check if the config files, that is fmtutil.cnf
# or one of the language* files have changed, regenerate them
# if necessary, and then run the necessary fmtutil calls.
-
{
# first check for language* files
my $regenerate_language = 0;
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index f45af102c9a..59b28bf3cb0 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2893,18 +2893,28 @@ sub create_language_lua {
}
sub _create_config_files {
- my ($tlpdb, $headfile, $dest,$localconf, $keepfirstline, $cc, $tlpdblinesref, @postlines) = @_;
+ my ($tlpdb, $headfile, $dest,$localconf, $keepfirstline, $cc,
+ $tlpdblinesref, @postlines) = @_;
my $root = $tlpdb->root;
- open(INFILE,"<$root/$headfile") or die("Cannot open $root/$headfile");
- my @lines = <INFILE>;
+ my @lines = ();
+ if (-r "$root/$headfile") {
+ # we might be in user mode and do *not* want that the generation
+ # of the configuration file just boils out.
+ open (INFILE, "<$root/$headfile")
+ || die "open($root/$headfile) failed, but -r ok: $!";
+ @lines = <INFILE>;
+ close (INFILE);
+ } else {
+ tlwarn("TLUtils::_create_config_files: $root/$headfile: "
+ . " head file not found, ok in user mode");
+ }
push @lines, @$tlpdblinesref;
- close (INFILE);
if (defined($localconf) && -r $localconf) {
#
# this should be done more intelligently, but for now only add those
# lines without any duplication check ...
- open FOO, "<$localconf"
- or die "strange, -r ok but cannot open $localconf: $!";
+ open (FOO, "<$localconf")
+ || die "strange, -r ok but cannot open $localconf: $!";
my @tmp = <FOO>;
close (FOO);
push @lines, @tmp;