summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-containers
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/tl-update-containers')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers21
1 files changed, 8 insertions, 13 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index 466bc525c27..dfe772a0dc7 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -24,25 +24,20 @@ use Pod::Usage;
use File::Path;
our $mydir;
-my $opt_debug = 0;
my $opt_location = ".";
my $opt_relative = 0;
my $opt_recreate = 0;
my $help = 0;
+TeXLive::TLUtils::process_logging_options();
+
GetOptions(
"location=s" => \$opt_location,
- "debug!" => \$opt_debug,
"recreate" => \$opt_recreate,
"help|?" => \$help) or pod2usage(1);
pod2usage(-exitstatus => 0, -verbose => 2) if $help;
-if ($opt_debug) {
- $::LOGLEVELFILE = $::LOG_DDDEBUG;
- $::LOGLEVELTERMINAL = $::LOG_DDDEBUG;
-}
-
exit (&main ());
sub main
@@ -65,7 +60,7 @@ sub main
. "; ignoring and continuing with $type";
}
- tllog($::LOG_DEBUG, "format=$type srcsplit=$srcsplit docsplit=$docsplit\n");
+ debug("format=$type srcsplit=$srcsplit docsplit=$docsplit\n");
my @todopacks = ();
my @removepacks = ();
@@ -99,7 +94,7 @@ sub main
&& defined($archiverevs{$pkg})) {
$oldrev = $archiverevs{$pkg};
} else {
- tllog($::LOG_NORMAL, "$pkg is new, found no containers\n");
+ info("$pkg is new, found no containers\n");
$count{"new"}++;
}
@@ -115,7 +110,7 @@ sub main
}
if ($oldrev == $newrev) {
- tllog($::LOG_DEBUG, "$pkg up to date\n");
+ debug("$pkg up to date\n");
$count{"unchanged"}++;
} elsif ($oldrev < $newrev) {
push @todopacks, $pkg;
@@ -137,7 +132,7 @@ sub main
next if ($pkg eq "00texlive.installer");
my $obj = $tlpdb->get_package ($pkg);
die "$0: no TL package named $pkg in $Master" if ! $obj;
- tllog($::LOG_DEBUG, "updating $pkg containers ...\n");
+ debug("updating $pkg containers ...\n");
# we have to make a copy otherwise the src/doc files in the original
# tlpobj are removed, and thus also in the tlpdb to be saved!!!
my $objcopy = $obj->copy;
@@ -163,7 +158,7 @@ sub main
# next we remove those containers which have been gone!
foreach my $op (@removepacks) {
- tllog($::LOG_NORMAL, "$op has disappeared, removing its containers\n");
+ info("$op has disappeared, removing its containers\n");
`rm $opt_containerdir/$op.*`;
$count{"removed"}++;
}
@@ -187,7 +182,7 @@ sub main
next if ($p eq "00texlive.config");
next if ($p eq "00texlive.installer");
if (! -r "$opt_containerdir/$p.tar.lzma") {
- tllog($::LOG_NORMAL, "container for $p is missing, strange!\n");
+ info("container for $p is missing, strange!\n");
}
}
}