summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers27
1 files changed, 18 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index c3ca0a7d97e..1d3c8c43098 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -86,10 +86,15 @@ sub main
if ($opt_recreate) {
# remake everything.
- @todopacks = @ARGV ? @ARGV : $tlpdb->list_packages;
- $nettlpdb = $tlpdb->copy;
+ if (@ARGV) {
+ @todopacks = @ARGV;
+ $nettlpdb = TeXLive::TLPDB->new;
+ die "Cannot create new tlpdb" unless defined($nettlpdb);
+ } else {
+ @todopacks = $tlpdb->list_packages;
+ $nettlpdb = $tlpdb->copy;
+ }
$nettlpdb->root($opt_location);
-
} else {
$nettlpdb = TeXLive::TLPDB->new("root" => $opt_location);
if (!defined($nettlpdb)) {
@@ -251,12 +256,16 @@ sub main
$count{"removed"}++;
}
- if (@todopacks && ! $opt_recreate) {
- # we updated something
- print "$0: $count{new} new, $count{removed} removed, "
- . "$count{updated} updated, $count{unchanged} unchanged.\n";
+ if ($opt_recreate) {
+ info("$0: all packages recreated!\n");
} else {
- print "$0: nothing to be done.\n";
+ if (@todopacks) {
+ # we updated something
+ print "$0: $count{new} new, $count{removed} removed, "
+ . "$count{updated} updated, $count{unchanged} unchanged.\n";
+ } else {
+ print "$0: nothing to be done.\n";
+ }
}
# STRANGE: It seems that calling -recreate did not save the
@@ -266,7 +275,7 @@ sub main
system("lzma --force -k -z $opt_location/tlpkg/texlive.tlpdb");
# do a last check that all the containers are actually present
- foreach my $p ($tlpdb->list_packages) {
+ foreach my $p ($nettlpdb->list_packages) {
next if $p =~ /00texlive.*\./;
if (! -r "$opt_containerdir/$p.tar.lzma") {
tlwarn ("container for $p is missing, strange!\n");