summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-11 21:44:55 +0000
committerKarl Berry <karl@freefriends.org>2008-10-11 21:44:55 +0000
commite0f2c4551fa5879bea03f6fb51ce9696a43b210f (patch)
tree935d7a01afa187edf1717c83e1977c98b8bda509 /Master
parent70bbf11ea97e2d18ec563504b5fe2fca01ae350c (diff)
report package log at end of run, if we wrote
anything to it. git-svn-id: svn://tug.org/texlive/trunk@10927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl25
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 4fdf30f7fa7..414b45265ce 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -97,9 +97,10 @@ GetOptions("location=s" => \$opt_location,
my $action = shift;
#
-# besides doing normal logging if -logfileis specified, we try to log all
+# besides doing normal logging if -logfile is specified, we try to log
# package related actions (install, remove, update) to
# the package-log file TEXMFSYSVAR/web2c/tlmgr.log
+my $packagelogged = 0; # how many msgs we logged.
my $texmfsysvar = `kpsewhich -var-value=TEXMFSYSVAR`;
chomp($texmfsysvar);
my $packagelogfile = ($opt_packagelogfile ? $opt_packagelogfile :
@@ -245,6 +246,7 @@ if ($action =~ m/^_include_tlpobj$/) {
# close the log file
if ($packagelogfile) {
+ print "tlmgr: package log updated at $packagelogfile\n" if $packagelogged;
close(PACKAGELOG);
}
#
@@ -314,13 +316,13 @@ sub remove_package {
my $tlp = $localtlpdb->get_package($pkg);
my %ret;
if (!defined($tlp)) {
- tlwarn ("Package $pkg not present, cannot remove it!\n");
+ tlwarn ("$pkg: package not present, cannot remove\n");
} else {
if (!$force) {
# do some checking
my @needed = $localtlpdb->needed_by($pkg);
if (@needed) {
- tlwarn ("$pkg: not removed, referenced in @needed\n");
+ tlwarn ("$pkg: not removed, referenced in @needed\n");
return;
}
}
@@ -456,7 +458,7 @@ sub action_remove {
my $tlp = $localtlpdb->get_package($pkg);
next if defined($already_removed{$pkg});
if (!defined($tlp)) {
- print "Package $pkg not present, cannot remove it!\n";
+ print "$pkg: package not present, cannot remove\n";
} else {
# in the first round we only remove collections, nothing else
# but removing collections will remove all dependencies, too
@@ -511,7 +513,7 @@ sub action_remove {
} else {
$localtlpdb->save;
my @foo = sort ( keys %already_removed );
- print "Actually removed packages: @foo\n";
+ print "tlmgr: actually removed these packages: @foo\n";
return(\%ret);
}
}
@@ -1834,11 +1836,12 @@ sub init_tlmedia {
}
#
-# the packagelog function
+# the logpackage function
# if the packagelog variable is set then write to PACKAGELOG filehandle
#
sub logpackage {
if ($packagelogfile) {
+ $packagelogged++;
my $tim = localtime();
print PACKAGELOG "[$tim] @_\n";
}
@@ -1967,11 +1970,11 @@ language code.
=item B<-package-logfile> I<file>
-B<tlmgr> logs all package actions (install, remove, update, failed updates
-and failed restores) to a separate log file. This is by default
-TEXMFSYSVAR/web2c/tlmgr.log. This option allows you to select a different
-file for that. Note that this is different from normal logging, for that
-see the option C<-v> below, and TeXLive::TLUtils.
+B<tlmgr> logs all package actions (install, remove, update, failed
+updates and failed restores) to a separate log file, by default
+C<TEXMFSYSVAR/web2c/tlmgr.log>. This option allows you to select a
+different file for that. This is different from normal
+logging; for that, see the option C<-v> below, and TeXLive::TLUtils.
=back