diff options
author | Karl Berry <karl@freefriends.org> | 2019-07-24 18:18:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-07-24 18:18:42 +0000 |
commit | 3a9a5b4dd340c7e38d65a42638726298fb49921c (patch) | |
tree | 1e213cc0bc934827cebe29cebfb39f574a907a0f /Master/tlpkg/bin | |
parent | 2868a03f2909ba44be144d48a611ad54bbce2ffd (diff) |
doc fixes
git-svn-id: svn://tug.org/texlive/trunk@51718 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin')
-rwxr-xr-x | Master/tlpkg/bin/tlpkginfo | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index ad673ba7c08..430d53b266d 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -3,9 +3,12 @@ # Public domain. Originally written 2005, Karl Berry. # # Return information given a TL package name (i.e., a tlpsrc file name). +# This requires local copies of CTAN and the TeX Catalogue. This program +# needs to be refactored with ctan2tl and ctan2ds, as we currently +# actually unpack .tds.zip files, etc., which does not seem right. +# # With -rev (--revision) argument given, returns only the revision number -# of the package (see below for details). -# We require local copies of CTAN and the TeX Catalogue. +# of a given package (see below for details). BEGIN { $^W = 1; @@ -26,13 +29,14 @@ sub main { sub tlpkgrevision { # output and exit codes: # repository not found or no modules available there - # output: -1 exit code: 1 + # stdout: -1 exit code: 1 # stderr warning # package not found: - # output: 0 exit code: 1 + # stdout: 0 exit code: 1 # stderr warning # both found - # output: rev exit code: 0 + # stdout: rev# exit code: 0 + # (no newline on stdout) # # tlpkginfo -revision <pkg> [ <tltree> ] require TeXLive::TLPOBJ; @@ -45,13 +49,13 @@ sub tlpkgrevision { } my $tlpdb = TeXLive::TLPDB->new ("root" => $root); if (!defined($tlpdb)) { - printf STDERR "Cannot find tlpdb in $root\n"; + printf STDERR "$0: Cannot find tlpdb in TL root dir $root\n"; print "-1"; exit(1); } my $pkg = $tlpdb->get_package($ARGV[1]); if (!defined($pkg)) { - printf STDERR "Cannot find $ARGV[1] package\n"; + printf STDERR "Cannot find package $ARGV[1] in TL tree of $root\n"; print "0"; exit(1); } @@ -104,6 +108,7 @@ sub ctaninfo { } else { die "Usage: $0 --ctan-dir PKGNAME\n" . " or: --prepare PKGNAME\n" + . " or: --revision PKGNAME [TLROOT]\n" . " or: --ctan-root\n" . "(not \"@ARGV\").\n"; } @@ -317,7 +322,11 @@ sub catalogue_find_ctan_path { # extract just the dir or file name, without options, etc. $ctan_path =~ m,path=(["'])/(.*?)\1,; $ctan_loc = $2; - return undef unless $ctan_loc; # should never happen, but who knows + if (! $ctan_loc) { + # should never happen, but who knows + warn "$0: no ctan_loc found in $ctan_path?!\n"; + return; + } # if the Catalogue lists the path as a single file, there are two # possibilities: (1) it really is a single file, e.g., texilikecover, @@ -330,6 +339,7 @@ sub catalogue_find_ctan_path { # babel-contrib/hungarian. Sigh. # #warn "catalogue ctan path $ctan_path, pkg $pkgname\n"; +#warn "catalogue ctan loc $ctan_loc\n"; my $ret; if ($ctan_path =~ /file='true'/) { (my $ctan_babel_path = $ctan_path) =~ s,babel-contrib/,babel-,; @@ -367,7 +377,7 @@ sub prepare { # tds path is usually in ctan/install... my $tds_path = $ctan_loc ? "$ctan_loc.tds.zip" : ""; $tds_path =~ s,^$CTAN,$CTAN/install,; - +#warn "prepare: tds_path for $pkg = $tds_path\n"; # ...except for heiko, when running on tug.org... if ($pkg =~ /^($oberdiek_tds)$/) { $tds_path = "/home/ftp/tex/$pkg/$pkg.tds.zip"; |