summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-07 10:33:56 +0000
committerNorbert Preining <preining@logic.at>2008-01-07 10:33:56 +0000
commitf3bf3f7d1547d267d7d105b5ab3964c98ba68705 (patch)
tree7e87a81991b0707f74bb1fc2d1372c4b0e13d2e3
parentc0b2e02b38d8841b7b3424caae8402cb4a1e9f08 (diff)
better failure handling, debugging statements for update-container
git-svn-id: svn://tug.org/texlive/trunk@6090 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/update-containers21
1 files changed, 19 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/update-containers b/Master/tlpkg/bin/update-containers
index 603e1de0d79..ecc6d393626 100755
--- a/Master/tlpkg/bin/update-containers
+++ b/Master/tlpkg/bin/update-containers
@@ -18,6 +18,7 @@ use strict;
use TeXLive::TLConfig;
use TeXLive::TLPOBJ;
use TeXLive::TLPDB;
+use TeXLive::TLUtils qw/debug/;
use Getopt::Long;
use Pod::Usage;
use File::Path;
@@ -72,10 +73,26 @@ sub main
# collect packages to be updated:
my @todopacks;
for my $pkg (@packs) {
- if ($archiverevs{$pkg} == $tlpdb->get_package($pkg)->revision) {
- # print "$pkg up to date\n";
+ my $oldrev = 0;
+ if (defined($archiverevs{$pkg})) {
+ $oldrev = $archiverevs{$pkg};
} else {
+ debug("found a new package without container: $pkg\n");
+ }
+ my $tlp = $tlpdb->get_package($pkg);
+ my $newrev = 0;
+ if (defined($tlp)) {
+ $newrev = $tlp->revision;
+ } else {
+ warn "It looks like $pkg has disappeared, you should remove its containers!\n";
+ }
+ if ($oldrev == $newrev) {
+ debug("$pkg up to date\n");
+ } elsif ($oldrev < $newrev) {
push @todopacks, $pkg;
+ } else {
+ # huhh, the new rev is SMALLER then the oldrev?!?!
+ die "This shouldn't happen, the revision of $pkg in texlive.tlpdb is OLDER than the one in $opt_containerdir/texlive.pkgver.\nAre you sure???\n";
}
}
# get list of packages.