diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-containers | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index 9aaa36c3e51..0a5eb6b06c2 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -80,6 +80,9 @@ sub main # collect packages to be updated. my %count; + $count{"new"} = $count{"removed"} = $count{"updated"} = $count{"unchanged"} + = 0; + my @todopacks = (); for my $pkg (@packs) { my $oldrev = 0; @@ -98,7 +101,7 @@ sub main } else { tllog($::LOG_NORMAL, "$pkg has disappeared, removing its containers\n"); `rm $opt_containerdir/$pkg.*`; - $count{"remove"}++; + $count{"removed"}++; } if ($oldrev == $newrev) { @@ -106,7 +109,7 @@ sub main $count{"unchanged"}++; } elsif ($oldrev < $newrev) { push @todopacks, $pkg; - $count{"update"}++ if $oldrev; + $count{"updated"}++ if $oldrev; } else { die "This shouldn't happen! The revision of $pkg in texlive.tlpdb" . "($newrev) is OLDER than the one in" @@ -120,7 +123,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; - print "$0: updating $pkg containers ...\n"; + tllog($::LOG_NORMAL, "updating $pkg containers ...\n"); if ($srcsplit) { my $objsrc = $obj->split_src_package; if ($objsrc) { @@ -131,7 +134,7 @@ sub main if ($docsplit) { my $objdoc = $obj->split_doc_package; if ($objdoc) { - $objdoc->make_container($type,$Master, $opt_containerdir, + $objdoc->make_container($type, $Master, $opt_containerdir, "$pkg.doc", $opt_relative); } } @@ -142,12 +145,12 @@ sub main if (@todopacks) { # we updated something print "$0: updating $opt_containerdir/texlive.pkgver ...\n"; - open(TMP,">$opt_containerdir/texlive.pkgver") - or die "open(>$opt_containerdir/texlive.pkgver) failed: $!"; - $tlpdb->generate_packagelist(\*TMP); - close(TMP); - print "$0: $count{new} new, $count{remove} removed, " - . "$count{update} updated.\n"; + my $PKGVER = ">$opt_containerdir/texlive.pkgver"; + open (TMP, $PKGVER) || die "open($PKGVER) failed: $!"; + $tlpdb->generate_packagelist (\*TMP); + close (TMP) || warn "close($PKGVER) failed: $!"; + print "$0: $count{new} new, $count{removed} removed, " + . "$count{updated} updated, $count{unchanged} unchanged.\n"; } else { print "$0: nothing to be done.\n"; } |