From a425057480a2ab8ddea0896d22fff152390cda3d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 9 Dec 2008 22:40:22 +0000 Subject: --no-ctan fix from jim hefferon git-svn-id: svn://tug.org/texlive/trunk@11569 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/check-depend-consistency | 32 +++++++++++++++++++------------ Master/tlpkg/bin/ctan2tl | 11 ++++++++--- 2 files changed, 28 insertions(+), 15 deletions(-) (limited to 'Master/tlpkg/bin') diff --git a/Master/tlpkg/bin/check-depend-consistency b/Master/tlpkg/bin/check-depend-consistency index 2859a3118d2..988bbbd6713 100755 --- a/Master/tlpkg/bin/check-depend-consistency +++ b/Master/tlpkg/bin/check-depend-consistency @@ -4,7 +4,7 @@ # This file is licensed under the GNU General Public License version 2 # or any later version. # -# Check that all package are contained in some collection. +# Check that all packages are contained in some collection. BEGIN { $^W = 1; @@ -27,7 +27,6 @@ use File::Path; my $help = 0; TeXLive::TLUtils::process_logging_options(); - GetOptions("help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -36,19 +35,26 @@ 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); + chomp (my $Master = `cd $mydir/../.. && pwd`); + my $tlpdb = TeXLive::TLPDB->new("root" => $Master); + die "$0: Cannot find tlpdb in $Master.\n" unless defined($tlpdb); + my %presentpkg; - my %wrongdep; for my $pkg ($tlpdb->list_packages) { $presentpkg{$pkg} = 1; } + + # list of collections. + my @colls = $tlpdb->collections; + my @coll_deps = $tlpdb->expand_dependencies("-no-collections",$tlpdb,@colls); + + + my %wrongdep; + my %nodep; for my $pkg ($tlpdb->list_packages) { # do not check any package starting with 00texlive next if $pkg =~ m/^00texlive/; - #next if ($pkg =~ m/^00texlive\.config$/); - #next if ($pkg =~ m/^00texlive-installation\.config$/); + for my $d ($tlpdb->get_package($pkg)->depends) { next if ($d =~ m/\.ARCH$/); if (!defined($presentpkg{$d})) { @@ -56,6 +62,7 @@ sub main } } } + if (keys %wrongdep) { print "DEPENDS WITHOUT PACKAGES:\n"; for my $d (keys %wrongdep) { @@ -65,12 +72,11 @@ sub main } - __END__ =head1 NAME -check-depend-consistency - check that all depends actually exist as packages +check-depend-consistency - check that all dependencies exist as packages =head1 SYNOPSIS @@ -84,8 +90,10 @@ function in L for details. =head1 DESCRIPTION -Check consistency of C statements in all TeX Live packages, -including collections and schemes. +Check that all C statements in all TeX Live packages +(collections, schemes, and normal packages) refer to existing packages, +according to the tlpdb that is within the hierarchy from which this +script is invoked. =head1 AUTHORS AND COPYRIGHT diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index 6ac192017ed..66125006e8a 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -55,7 +55,12 @@ if test -z "$pkg"; then exit 1 fi -ctan_dir1=`tlpkginfo --prepare $pkg` +if $copy_from_ctan; then + ctan_dir1=`tlpkginfo --prepare $pkg` +else + ctan_dir1="$pkg" +fi + if test -z "$ctan_dir1"; then echo "$0: can't find CTAN directory for $pkg." >&2 exit 1 @@ -91,13 +96,13 @@ else cp -pr $ctan_dir1/. $pkg fi -fi # end of copying from CTAN. - # clean up the tmpdir possibly created by 'tlpkginfo --prepare' ctan_root=`tlpkginfo --ctan-root` if ! echo "$ctan_dir1" | egrep "^$ctan_root" >/dev/null; then rm -rf $ctan_dir1 fi +fi # end of copying from CTAN. + # printf "\n$0: calling ctan2tds\n" -- cgit v1.2.3