diff options
author | Karl Berry <karl@freefriends.org> | 2008-09-02 17:55:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-09-02 17:55:23 +0000 |
commit | 94387ea2e54fa946b36805dc946385815ed3e670 (patch) | |
tree | 027d431fb08fe12d04735583313b4cfd500e2186 /Master/tlpkg/bin | |
parent | daeb29cf6271ac2eb7ade2fb9798dd0038f0ef6a (diff) |
require --all to update TL infrastructure containers; avoid "done" in install when not done, cleanup takes too long
git-svn-id: svn://tug.org/texlive/trunk@10415 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-containers | 78 |
1 files changed, 61 insertions, 17 deletions
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index 6e813478f82..08db2da064b 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -1,5 +1,4 @@ #!/usr/bin/env perl -# $Id$ # Copyright 2008 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -8,13 +7,13 @@ # (doesn't really work, not documented), or all if none specified. BEGIN { + $vc_id = '$Id$'; $^W = 1; ($mydir = $0) =~ s,/[^/]*$,,; unshift (@INC, "$mydir/.."); } use strict; - use TeXLive::TLConfig; use TeXLive::TLPOBJ; use TeXLive::TLPDB; @@ -23,22 +22,31 @@ use Getopt::Long; use Pod::Usage; use File::Path; -our $mydir; +# packages matching these re's will not be updated without --all. +my @critical_pkg_list = qw/bin-texlive texlive\.infra/; + +our ($mydir, $vc_id); my $opt_location = "."; my $opt_relative = 0; my $opt_recreate = 0; -my $help = 0; +my $opt_help = 0; +my $opt_version = 0; +my $opt_all = 0; TeXLive::TLUtils::process_logging_options(); GetOptions( - "location=s" => \$opt_location, - "recreate" => \$opt_recreate, - "help|?" => \$help) or pod2usage(1); + "location=s" => \$opt_location, + "recreate" => \$opt_recreate, + "all|a" => \$opt_all, + "version" => \$opt_version, + "help|?" => \$opt_help) or pod2usage(1); -pod2usage(-exitstatus => 0, -verbose => 2) if $help; +pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help; +if ($opt_version) { print "$vc_id\n"; exit 0; } -exit (&main ()); +exit (&main()); +# the real work sub main { # get the db. @@ -52,7 +60,7 @@ sub main my $docsplit = $tlpdb->config_doc_container; my $format = $tlpdb->config_container_format; my $type = "lzma"; - if (($format eq "lzma") || ($format eq "zip")) { + if ($format eq "lzma" || $format eq "zip") { $type = $format; } else { warn "$0: unknown container format specified in 00texlive.config: $format" @@ -144,9 +152,30 @@ sub main &TeXLive::TLUtils::setup_programs("$Master/tlpkg/installer"); # get list of packages. - for my $pkg (sort @todopacks) { + PACKS: for my $pkg (sort @todopacks) { next if ($pkg eq "00texlive.config"); next if ($pkg eq "00texlive.installer"); + foreach my $manualpkgre (@critical_pkg_list) { + # we match the initial string of the package name, so that all the + # .arch packages are skipped, too + if ($pkg =~ m/^$manualpkgre/) { + if ($opt_all || $opt_recreate) { + tlwarn ("updating container for $pkg due to -all option!\n"); + last; # of the manualpkgre checks + } else { + tlwarn ("not updating $pkg since it it in the manual update list!\n"); + # we assume that the packages in @critical_pkg_list always + # exist, so if they are there then the number of updated packages + # should be reduced. + $count{'updated'}--; + # the following line skips all other regexp checks on critical + # packages and skips everything below this big for list (the + # part which actually builds the containers) and continues with + # the next package (the PACKS: for my $pkg (sort @todopacks) line + next PACKS; + } + } + } my $obj = $tlpdb->get_package ($pkg); die "$0: no TL package named $pkg in $Master" if ! $obj; debug("updating $pkg containers ...\n"); @@ -198,7 +227,7 @@ sub main } # next we remove those containers which have been gone! - foreach my $op (@removepacks) { + for my $op (@removepacks) { info("$op has disappeared, removing its containers\n"); `rm $opt_containerdir/$op.*`; $nettlpdb->remove_package($op); @@ -237,24 +266,39 @@ tl-update-containers - create, update, or remove TL containers =head1 SYNOPSIS -tl-update-containers [OPTION]... +tl-update-containers [I<option>]... =head1 OPTIONS =over 8 =item B<-location> I</container/dir> + The location to find the previously generated containers; default is C<./archive>. +=item B<-recreate> + +Does a full rebuild of all packages. + +=item B<-all|-a> + +Will update also packages which are exempted due to possible breakage +(currently texlive.infra and bin-texlive). + +=item B<-help> + +Print this documentation and exit. + =back -The standard options C<-help> and C<-debug> are also accepted. -See the tlpfiles documentation for details. +The standard options B<-q>, B<-v>, and B<-logfile>=I<file> are also +accepted; see the C<process_logging_options> function in +L<TeXLive::TLUtils> for details. -The format of the containers and the splitting off of source and +The format of the containers and the splitting of source and documentation files are controlled by the TLPDB options in the -pseudo-package C<00texlive.config>. See the documentation for TLPDB. +pseudo-package C<00texlive.config>. See the documentation for TLPDB. =head1 DESCRIPTION |