summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-10 18:40:37 +0000
committerKarl Berry <karl@freefriends.org>2008-03-10 18:40:37 +0000
commit724feb33b533201fa10b2b1abaf681f058c1a916 (patch)
tree7709320ccdaa2013c4e72d310b81c62019d27a98 /Master
parent573ab25e2cbbc619bbf72b52e66cfbd3840c69d7 (diff)
report number of unchanged packages; don't report
every update git-svn-id: svn://tug.org/texlive/trunk@6932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers23
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";
}