summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-09-30 12:31:50 +0000
committerNorbert Preining <preining@logic.at>2008-09-30 12:31:50 +0000
commit4b04dbdaf4dc4a33b34dfb1381cc7fd2c8c39d42 (patch)
treefc41d93ac84cbb33b2d7ddb180f231c13884eaef
parentd9bfb91d9239e9317f94890e9cf55e87aa64b811 (diff)
tl-update-containers:
- make recreate use a new TLPDB if @ARGV is given, otherwise a copy - make the info messages more logical git-svn-id: svn://tug.org/texlive/trunk@10800 c570f23f-e606-0410-a88d-b1316a301751
-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");