diff options
-rwxr-xr-x | Master/tlpkg/bin/ctan2tds | 10 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-update-containers | 75 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-update-tlnet | 28 |
3 files changed, 57 insertions, 56 deletions
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds index 2339f91638a..89cdac59b50 100755 --- a/Master/tlpkg/bin/ctan2tds +++ b/Master/tlpkg/bin/ctan2tds @@ -462,7 +462,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw 'context-lilypond' => '&POSTcontext_lilypond', 'datetime' => '&POSTlatex2html', 'doipubmed' => '&POSTlatex2html', - 'elsarticle' => '&POSTelsarticle', + 'elsarticle' => '&POSTelsarticle', 'fpl' => '&POSTfpl', 'glossaries' => '&POSTglossaries', 'ibygrk' => '&POSTibygrk', @@ -1306,7 +1306,6 @@ $standardclean = '\.head|\.tmp|\.dvi|\.log|\.out|\.aux|\.toc|\.lof|\.lot' 'din1505' => 'leitbild3.pdf|normpatsoft.pdf', # no source 'ecclesiastic' => 'ecclesiastic-sample.pdf', # no source 'ednotes' => 'perpage.sty', # copy from bigfoot -# 'elsarticle' => 'elsdoc.pdf', # no source 'epslatex-fr' => 'R?Danger.eps', 'flacards' => 'flacards.pdf', 'gfsartemisia' => 'A*Specimen.pdf', # nonfree @@ -3320,9 +3319,12 @@ sub POSTlatex2html sub POSTelsarticle { - print "POST$package - move stuff contrib and src/* to source\n"; + print "POST$package - move contrib and src/* to source\n"; + &xchdir ("$DEST/doc/$whichdocformat/$package"); + warn `pwd`; + warn `vdir`; my $dest = "$DEST/source/latex/$package"; - &SYSTEM ("mkdir -p $dest"); + &xmkdir ($dest); # we don't need two copies of that file &SYSTEM ("rm contrib/elsdoc.pdf"); &SYSTEM ("mv contrib $dest"); diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index dc389b45eb3..134661e22f4 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -4,7 +4,8 @@ # or any later version. # # Generate archive file(s) for the packages specified on the cmdline -# (doesn't really work, not documented), or all if none specified. +# (doesn't really work, not documented), or all (except some critical +# packages) if none specified. BEGIN { $vc_id = '$Id$'; @@ -26,33 +27,33 @@ use File::Path; my @critical_pkg_list = qw/bin-texlive texlive\.infra texlive-en/; our ($mydir, $vc_id); +my $opt_all = 0; my $opt_location = "."; -my $opt_relative = 0; +my $opt_nosetup = 0; my $opt_recreate = 0; -my $opt_help = 0; +my $opt_relative = 0; my $opt_version = 0; -my $opt_all = 0; -my $opt_nosetup = 0; +my $opt_help = 0; TeXLive::TLUtils::process_logging_options(); GetOptions( - "location=s" => \$opt_location, - "recreate" => \$opt_recreate, "all|a" => \$opt_all, + "location=s" => \$opt_location, "no-setup" => \$opt_nosetup, + "recreate" => \$opt_recreate, "version" => \$opt_version, "help|?" => \$opt_help) or pod2usage(1); -pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help; +pod2usage("-exitstatus" => 0, "-verbose" => 2) if $opt_help; if ($opt_version) { print "$vc_id\n"; exit 0; } exit (&main()); -# the real work + sub main { - # get the db. - chomp(my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default + # get our db, same hierarchy from which we are being run. + chomp(my $Master = `cd $mydir/../.. && pwd`); my $tlpdb = TeXLive::TLPDB->new("root" => $Master); die "cannot find tlpdb in $Master" unless defined($tlpdb); my @packs = @ARGV ? @ARGV : $tlpdb->list_packages; @@ -68,29 +69,29 @@ sub main warn "$0: unknown container format specified in 00texlive.config: $format" . "; ignoring and continuing with $type"; } - debug("format=$type srcsplit=$srcsplit docsplit=$docsplit\n"); - my @todopacks = (); - my @removepacks = (); - my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::Archive"; - my %count; - my $nettlpdb; - - if (!$opt_recreate) { + if (! $opt_recreate) { if (! -r "$opt_location/tlpkg/texlive.tlpdb") { - warn ("Cannot load tlpdb from $opt_location, going into recreate mode!"); + warn "Cannot load tlpdb from $opt_location, going into recreate mode!"; $opt_recreate = 1; } } + my @todopacks = (); + my @removepacks = (); + my $opt_containerdir = "$opt_location/$TeXLive::TLConfig::Archive"; + my $nettlpdb; + my %count; + if ($opt_recreate) { # remake everything. @todopacks = $tlpdb->list_packages(); $nettlpdb = $tlpdb->copy; $nettlpdb->root($opt_location); + } else { - $nettlpdb = TeXLive::TLPDB->new(root => $opt_location); + $nettlpdb = TeXLive::TLPDB->new("root" => $opt_location); if (!defined($nettlpdb)) { die "Cannot init tlpdb from $opt_location ..."; } @@ -157,7 +158,7 @@ sub main } # set up the programs ... - if ($opt_nosetup) { + if ($opt_nosetup) { # do a minimal setup $::progs{'lzma'} = "lzma"; $::progs{'tar'} = "tar"; @@ -168,8 +169,7 @@ sub main # get list of packages. PACKS: for my $pkg (sort @todopacks) { - next if ($pkg eq "00texlive.config"); - next if ($pkg eq "00texlive.installer"); + next if $pkg =~ /^00texlive\.(config|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 @@ -177,16 +177,18 @@ sub main if ($opt_all || $opt_recreate) { tlwarn ("$0: updating critical $pkg due to -all\n"); last; # of the manualpkgre checks + } else { tlwarn ("$0: skipping critical $pkg\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 + # packages and skips everything below this (the part which + # actually builds the containers) and continues with the next + # package (the PACKS: label above). next PACKS; } } @@ -267,7 +269,7 @@ sub main foreach my $p ($tlpdb->list_packages) { next if $p =~ /00texlive.*\./; if (! -r "$opt_containerdir/$p.tar.lzma") { - info ("container for $p is missing, strange!\n"); + tlwarn ("container for $p is missing, strange!\n"); } } } @@ -299,10 +301,12 @@ 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). +(currently C<texlive.infra>, C<bin-texlive>, and C<texlive-en>). =item B<-no-setup> -Does not try to setup the various programs, but uses I<lzma> and I<tar>. + +Does not try to setup the various programs, but uses I<lzma> and I<tar> +from path. =item B<-help> @@ -321,12 +325,11 @@ pseudo-package C<00texlive.config>. See the documentation for TLPDB. =head1 DESCRIPTION -The B<tl-update-containers> program compares the revision of each -package found in C<containerdir> with the revision of the same package -in C<texlive.tlpdb>, found relative to this script. Where the latter is -newer (i.e., a higher number), the container(s) for the package are -updated. Where the container(s) do not exist, they are created. When -the package no longer exists in tlpdb, the container(s) are removed. +This program compares C<texlive.tlpdb> (found relative to this script) +with the specified I<containerdir>. If a tlpdb package is newer (i.e., +a higher revision number), the container(s) for the package are updated. +When the package exists in tlpdb only, it is created in I<containerdir>. +When the package exists in I<containerdir> only, it is removed from there. =head1 AUTHORS AND COPYRIGHT diff --git a/Master/tlpkg/bin/tl-update-tlnet b/Master/tlpkg/bin/tl-update-tlnet index dc3b0db455e..1577c6958d5 100755 --- a/Master/tlpkg/bin/tl-update-tlnet +++ b/Master/tlpkg/bin/tl-update-tlnet @@ -4,20 +4,13 @@ # or any later version. # # Update a TeX Live tlnet distribution, with testing. -# -# TODO: -# - only remove the old tlnet and move the newly one to the old place in case -# that actually something has changed. OTOH we have to check the output -# of tl-update-containers (is that trustworthy?), OTOH the install packages -# size (md5sums?) -# - other tests with the installed system? -# - help msg. vc_id='$Id$' unset CDPATH unset LS_COLORS chicken=false +yyyy=2008 while test $# -gt 0; do case $1 in @@ -33,7 +26,7 @@ while test $# -gt 0; do shift done -test -z "$tlweb" && tlweb=/home/ftp/texlive/tlnet/2008 +test -z "$tlweb" && tlweb=/home/ftp/texlive/tlnet/$yyyy if test -z "$Master"; then mydir=`dirname $0` Master=`cd $mydir/../.. && pwd` @@ -45,11 +38,10 @@ if test ! -r "$tlweb/tlpkg/texlive.tlpdb"; then fi test -z "$tlwebtrybase" \ && tlwebtrybase=`cd $tlweb/../.. && pwd`/tlnet-trial-`date +%y%m%d` - tlwebtry=$tlwebtrybase/tlsrc.try +echo "$0: using tlweb=$tlweb" # top level network directory, mirrored +echo "$0: using tlwebtry=$tlwebtry" # local working dir -echo "$0: using tlweb=$tlweb" -echo "$0: using tlwebtry=$tlwebtry" # # Be sure we're starting the test cleanly. @@ -57,6 +49,7 @@ rm -rf $tlwebtrybase mkdir -p $tlwebtry cp -al $tlweb/* $tlwebtry # assuming GNU cp +# Update packages in our working dir. echo "$0: Updating $tlwebtry in cow-shell..." cd $tlwebtry cow-shell <<END_COW @@ -70,17 +63,17 @@ echo "$0: Running tl-update-install-pkg..." $Master/tlpkg/bin/tl-update-install-pkg -o $tlwebtry END_COW + +# # Now we have an updated tlweb in $tlwebtry where only the changed files # are actual files, the rest are hard links. # Try to make a test installation. - cd $tlwebtrybase tlwebtryinst=$tlwebtrybase/tlinst.try -yyyy=2008 zcat $tlwebtry/install-tl-unx.tar.gz | tar -xf - cd install-tl -# create profile: +# create TL install profile: echo "# texlive-profile from $0 selected_scheme scheme-full TEXDIR $tlwebtryinst/$yyyy @@ -98,7 +91,7 @@ option_symlinks 0 echo "$0: Running test install (log: `pwd`/install.log)..." perl install-tl -location $tlwebtry -profile texlive.profile >install.log 2>&1\ -|| true # install-tl can fail, but we test the output!! +|| true # install-tl can fail, but we test the output, so don't abort. # the following long grep command should filter away all *normal* # installation messages. @@ -134,6 +127,8 @@ unexpected_output=`cat install.log \ | grep -Ev '^Logfile: ' \ | cat` + +# if test -z "$unexpected_output"; then # no unexpected output, so ship the new packages. cd $tlwebtrybase @@ -149,6 +144,7 @@ if test -z "$unexpected_output"; then exit 0 else echo "$0: Test installation failed, not removing anything!" >&2 + echo "$0: (Don't forget to clean up later, please.)" >&2 echo "$0: Here is the unexpected output:" >&2 echo "$unexpected_output" >&2 echo |