diff options
-rwxr-xr-x | Master/tlpkg/bin/tl-update-containers | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index caa47470a16..ffda46f7373 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -31,11 +31,10 @@ my $opt_force = 0; my $help = 0; TeXLive::TLUtils::process_logging_options(); - GetOptions( + "force" => \$opt_force, "location=s" => \$opt_location, "recreate" => \$opt_recreate, - "force" => \$opt_force, "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -69,10 +68,13 @@ sub main my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::NetArchive"; my %count; my $nettlpdb; + if ($opt_recreate) { + # remake everything. @todopacks = $tlpdb->list_packages(); $nettlpdb = $tlpdb->copy; $nettlpdb->root($opt_location); + } else { $nettlpdb = TeXLive::TLPDB->new(root => $opt_location); if (!defined($nettlpdb)) { @@ -197,20 +199,21 @@ sub main `rm $opt_containerdir/$op.*`; $count{"removed"}++; } - if (@todopacks) { + + if (@todopacks && ! $opt_recreate) { # we updated something print "$0: $count{new} new, $count{removed} removed, " . "$count{updated} updated, $count{unchanged} unchanged.\n"; - # Finally we copy the source tlpdb over to the destination tlpdb } else { print "$0: nothing to be done.\n"; } - # STRANGE: It seems that calling -recreate did somehow not safe the + + # STRANGE: It seems that calling -recreate did not save the # docfiles into the texlive.tlpdb, no idea why. So update should now - # do that + # do that. $nettlpdb->save; 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) { next if $p =~ /00texlive.*\./; @@ -235,7 +238,7 @@ tl-update-containers [OPTION]... =over 8 -=item B<-containerdir> I<containerdir> +=item B<-location> I</container/dir> The location to find the previously generated containers; default is C<./tlpkg>. If this is changed so that the containers appear in a different directory on the net, then you need to also |