summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-05-06 22:53:30 +0000
committerNorbert Preining <preining@logic.at>2016-05-06 22:53:30 +0000
commit8e28c1af228ba56dc0380b2689f7516e459cc966 (patch)
tree22a0e6f9a0ef4364598d9264e2765bba93b6ad9c /Master/tlpkg/TeXLive
parent6281603732b90d454ebdc32de3163780d0487aee (diff)
TLUtils:_create_config_file: generate file even with no entries
If the last entry of a config file is removed we still need to recreate a config file. Example: Last package shipping a .map file is removed, then also this last entry from updmap.cfg needs to be removed. Thanks Ken Brown for pointing this out. git-svn-id: svn://tug.org/texlive/trunk@40922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm24
1 files changed, 11 insertions, 13 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 6fbcff6c5c2..52fd4c9159f 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2753,21 +2753,19 @@ sub _create_config_files {
if (@postlines) {
push @lines, @postlines;
}
- if ($#lines >= 0) {
- if ($usermode && -e $dest) {
- tlwarn("Updating $dest, backup copy in $dest.backup\n");
- File::Copy::copy($dest, "$dest.backup");
- }
- open(OUTFILE,">$dest")
- or die("Cannot open $dest for writing: $!");
+ if ($usermode && -e $dest) {
+ tlwarn("Updating $dest, backup copy in $dest.backup\n");
+ File::Copy::copy($dest, "$dest.backup");
+ }
+ open(OUTFILE,">$dest")
+ or die("Cannot open $dest for writing: $!");
- if (!$keepfirstline) {
- print OUTFILE $cc;
- printf OUTFILE " Generated by %s on %s\n", "$0", scalar localtime;
- }
- print OUTFILE @lines;
- close(OUTFILE) || warn "close(>$dest) failed: $!";
+ if (!$keepfirstline) {
+ print OUTFILE $cc;
+ printf OUTFILE " Generated by %s on %s\n", "$0", scalar localtime;
}
+ print OUTFILE @lines;
+ close(OUTFILE) || warn "close(>$dest) failed: $!";
}
sub parse_AddHyphen_line {