From 015c330b5003b42f4232b3027736e2f386ad2f66 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 3 Mar 2008 20:32:40 +0000 Subject: leftovers, doc tweaks, semi-support specifying containers to update, make tlpver optional in update-containers git-svn-id: svn://tug.org/texlive/trunk@6836 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 10 +++-- Master/tlpkg/bin/ctan2tds | 4 +- Master/tlpkg/bin/tl-update-containers | 81 +++++++++++++++++++---------------- Master/tlpkg/bin/tlpkg-ctan-check | 3 +- Master/tlpkg/tlpsrc/bin-a2ping.tlpsrc | 4 ++ 5 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 Master/tlpkg/tlpsrc/bin-a2ping.tlpsrc (limited to 'Master') diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index f3ead7180bd..ba33b19e721 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -391,9 +391,10 @@ sub package_revision { =item C<< $tlpdb->generate_packagelist >> -The C lists all available TL Packages together -with their revisions. It furthermore lists all available architectures -as packages with revision number -1. +The C prints TeX Live package names in the object +database, together with their revisions, to the file handle given in the +first (optional) argument, or C by default. It also outputs all +available architectures as packages with revision number -1. =cut @@ -401,7 +402,8 @@ sub generate_packagelist { my $self = shift; my $fd = (@_ ? $_[0] : STDOUT); foreach (sort keys %{$self->{'tlps'}}) { - print $fd $self->{'tlps'}{$_}->name, " ", $self->{'tlps'}{$_}->revision, "\n"; + print $fd $self->{'tlps'}{$_}->name, " ", + $self->{'tlps'}{$_}->revision, "\n"; } foreach ($self->available_architectures) { print $fd "$_ -1\n"; diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds index 63ed2a91798..adda207427a 100755 --- a/Master/tlpkg/bin/ctan2tds +++ b/Master/tlpkg/bin/ctan2tds @@ -497,6 +497,7 @@ $standardfoundry='public'; 'dtxtut', 'texmf-doc', 'elhyphen', 'texmf', 'epslatex-fr', 'texmf-doc', + 'epstopdf', 'texmf', 'es-tex-faq', 'texmf-doc', 'free-math-font-survey', 'texmf-doc', 'hyphenex', 'texmf-dist', @@ -1246,7 +1247,8 @@ $standardocp='\.ocp'; $standardxmt='\.xmt'; %specialscripts = ( - 'a2ping' => '\.pl', + 'a2ping' => '\.pl$', + 'epstopdf' => 'epstopdf', ); # which suffixes to remove after building. Checked after runins and at diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers index 0d59537d916..f0bc652afd9 100755 --- a/Master/tlpkg/bin/tl-update-containers +++ b/Master/tlpkg/bin/tl-update-containers @@ -4,8 +4,8 @@ # This file is licensed under the GNU General Public License version 2 # or any later version. # -# Generate an archive file for the packages specified on the cmdline, or -# all if none specified. +# Generate archive file(s) for the packages specified on the cmdline +# (doesn't really work, not documented), or all if none specified. BEGIN { $^W = 1; @@ -41,24 +41,21 @@ if ($opt_debug) { $::LOGLEVELTERMINAL = $::LOG_DDDEBUG; } -my $srcsplit = 0; -my $docsplit = 0; -my $type = "lzma"; - exit (&main ()); sub main { # get the db. - chomp (my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default - my $tlpdb = TeXLive::TLPDB->new ("root" => $Master); - die("Cannot find tlpdb in $Master!\n") unless defined($tlpdb); - my @packs; - @packs = $tlpdb->list_packages; + chomp(my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default + my $tlpdb = TeXLive::TLPDB->new("root" => $Master); + die "cannot find tlpdb in $Master" unless defined($tlpdb); + my @packs = @ARGV ? @ARGV : $tlpdb->list_packages; + # get configuration of package splitting - $srcsplit = $tlpdb->config_src_container; - $docsplit = $tlpdb->config_doc_container; + my $srcsplit = $tlpdb->config_src_container; + my $docsplit = $tlpdb->config_doc_container; my $format = $tlpdb->config_container_format; + my $type = "lzma"; if (($format eq "lzma") || ($format eq "zip")) { $type = $format; } else { @@ -66,24 +63,30 @@ sub main . "; ignoring and continuing with $type"; } - # read in the old texlive.pkgver and save the revisions + tllog($::LOG_NORMAL, "format=$type srcsplit=$srcsplit docsplit=$docsplit\n"); + + # read in the old texlive.pkgver and save the revisions. + # If it's not present, we'll update everything, i.e., populating a + # directory for the first time. my %archiverevs; - open(TMP,"<$opt_containerdir/texlive.pkgver") - or die "open($opt_containerdir/texlive.pkgver) failed: $!"; - while () { - my ($pkg,$rev) = split; - $archiverevs{$pkg} = $rev; + local *TMP; + if (open(TMP, "<$opt_containerdir/texlive.pkgver")) { + while () { + my ($pkg,$rev) = split; + $archiverevs{$pkg} = $rev; + } + close(TMP); } - close(TMP); # collect packages to be updated: - my @todopacks; + my @todopacks = (); for my $pkg (@packs) { my $oldrev = 0; - if (defined($archiverevs{$pkg})) { + if (-r "$opt_containerdir/$pkg.tar.$type" + && defined($archiverevs{$pkg})) { $oldrev = $archiverevs{$pkg}; } else { - tllog($::LOG_DEBUG, "$pkg is new, found no container\n"); + tllog($::LOG_DEBUG, "$pkg is new, found no containers\n"); } my $tlp = $tlpdb->get_package($pkg); @@ -111,23 +114,24 @@ sub main next if ($pkg eq "00texlive.config"); next if ($pkg eq "00texlive.installer"); my $obj = $tlpdb->get_package ($pkg); - die "$0: no TeX Live package named $pkg in $Master" if ! $obj; + die "$0: no TL package named $pkg in $Master" if ! $obj; print "$0: updating $pkg containers ...\n"; if ($srcsplit) { my $objsrc = $obj->split_src_package; if ($objsrc) { - $objsrc->make_container($type,$Master,$opt_containerdir,"$pkg.source", - $opt_relative); + $objsrc->make_container($type, $Master, $opt_containerdir, + "$pkg.source", $opt_relative); } } if ($docsplit) { my $objdoc = $obj->split_doc_package; if ($objdoc) { - $objdoc->make_container($type,$Master,$opt_containerdir,"$pkg.doc", - $opt_relative); + $objdoc->make_container($type,$Master, $opt_containerdir, + "$pkg.doc", $opt_relative); } } - $obj->make_container($type,$Master,$opt_containerdir,$pkg,$opt_relative); + $obj->make_container($type, $Master, $opt_containerdir, + $pkg, $opt_relative); } if (@todopacks) { @@ -144,24 +148,23 @@ sub main } - __END__ =head1 NAME -tl-update-containers - update already generated containers +tl-update-containers - create, update, or remove TL containers =head1 SYNOPSIS -tl-update-containers [OPTION]... +tl-update-containers [OPTION]... =head1 OPTIONS =over 8 =item B<-containerdir> I -The location where the previously generated containers are to be found, -defaults to C<./archive>. +The location to find the previously generated containers; +default is C<./archive>. =back @@ -175,10 +178,12 @@ pseudo-package C<00texlive.config>. See the documentation for TLPDB. =head1 DESCRIPTION -The B program compares the revisions of all packages -as found in the C with the revisions of the packages in -the C. In case the latter is more recent (i.e., a higher -number) the containers are updated. +The B program compares the revision of each +package found in C with the revision of the same package +in C, 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. =head1 AUTHORS AND COPYRIGHT diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 94455ac4f09..0ef0922cdd4 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -64,7 +64,8 @@ my @WorkingTLP = qw( egplot eijkhout elatex ellipsis elpres elsevier elsevier-bib emulateapj endfloat endheads engrec enumitem envbig environ epigrafica epiolmec eplain epsdice - epsf epslatex-fr epspdfconversion eqlist eqparbox errata es-tex-faq + epsf epslatex-fr epspdfconversion epstopdf + eqlist eqparbox errata es-tex-faq ESIEEcv esdiff esint esint-type1 eskd eskdx eso-pic esvect etaremune ethiop ethiop-t1 etoolbox euenc eulervm euproposal euro europecv eurosans everypage exam diff --git a/Master/tlpkg/tlpsrc/bin-a2ping.tlpsrc b/Master/tlpkg/tlpsrc/bin-a2ping.tlpsrc new file mode 100644 index 00000000000..05d468d0867 --- /dev/null +++ b/Master/tlpkg/tlpsrc/bin-a2ping.tlpsrc @@ -0,0 +1,4 @@ +name a2ping +category TLCore +runpattern f texmf/scripts/a2ping/a2ping.pl +binpattern f bin/${ARCH}/a2ping -- cgit v1.2.3