summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-21 22:07:38 +0000
committerKarl Berry <karl@freefriends.org>2013-07-21 22:07:38 +0000
commit88a74fd8ee8d228df7363666c16f85b3fcb94f0b (patch)
treea6c5f233579230804a4540b842e2c7d0c5e12074 /Master/tlpkg
parente084e4f8235d8fa63be506f6a53b9cf7cdedc2cf (diff)
usermode and updmap creation, report from Jan Musinsky 20 Jul 2013 16:20:04, fixes from Norbert
git-svn-id: svn://tug.org/texlive/trunk@31259 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm22
1 files changed, 16 insertions, 6 deletions
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;