summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/texlive
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-21 16:45:22 +0000
committerKarl Berry <karl@freefriends.org>2020-03-21 16:45:22 +0000
commit54c3140e67c41116370d93a5fb6fc27cc65cd031 (patch)
tree034ea63a4558bf51ea10a8c4997ac0bafd9aa2b6 /Master/texmf-dist/scripts/texlive
parentd70b43aa614995740f4ddfb6dfc00374fe6adcef (diff)
(do_cmd_and_check): prefix each line of cmd output with "(cmd)".
(main): debug msg with used $packagelogfile. git-svn-id: svn://tug.org/texlive/trunk@54446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texlive')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 0d5f8cf82ff..a63741af265 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -649,6 +649,8 @@ for the full story.\n";
debug("Cannot open package log file for appending: $packagelogfile\n");
debug("Will not log package installation/removal/update for this run\n");
$packagelogfile = "";
+ } else {
+ debug("appending to package log file: $packagelogfile\n");
}
$loadmediasrcerror = "Cannot load TeX Live database from ";
@@ -827,15 +829,22 @@ sub do_cmd_and_check {
} else {
($out, $ret) = TeXLive::TLUtils::run_cmd("$cmd 2>&1");
}
+ # Although it is quite verbose to report all the output from every
+ # fmtutil (especially) run, it's the only way to know what's normal
+ # when something fails. Prefix each line to make them easy to see
+ # (and filter out/in).
+ (my $prefixed_out = $out) =~ s/^/(cmd)/gm;
+ $prefixed_out =~ s/\n+$//; # trailing newlines don't seem interesting
+ my $outmsg = "output:\n$prefixed_out\n--end of output of $cmd.\n";
if ($ret == $F_OK) {
info("done running $cmd.\n");
- logpackage("success, output: $out");
- ddebug("--output of $cmd:\n$out\n--end of output of $cmd.");
+ logpackage("success, $outmsg");
+ ddebug("$cmd $outmsg");
return ($F_OK);
} else {
info("\n");
tlwarn("$prg: $cmd failed (status $ret), output:\n$out\n");
- logpackage("error, status: $ret, output: $out");
+ logpackage("error, status: $ret, $outmsg");
return ($F_ERROR);
}
}