diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-03 14:19:25 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-03 14:19:25 +0000 |
commit | 393d6d06e24b64afbfd69018124b4bab980999ea (patch) | |
tree | e4bbb18e3bf82d3be9e8486a17c283fd412f9bc6 /Master/tlpkg/bin/tlpkginfo | |
parent | 6d44e6cbe3c5d36234b1ae2e3713b395ffe84613 (diff) |
tds ready packages handling
git-svn-id: svn://tug.org/texlive/trunk@7820 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tlpkginfo')
-rwxr-xr-x | Master/tlpkg/bin/tlpkginfo | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 1bfe5709ad8..ea9eb27d462 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -19,12 +19,16 @@ sub main if ($ARGV[0] eq "--ctan-dir") { return &find_ctan_dir ($ARGV[1]); + } elsif ($ARGV[0] eq "--ctan-dir-tds") { + $want_tds = 1; + return &find_ctan_dir ($ARGV[1]); + } elsif ($ARGV[0] eq "--ctan-root") { print "$CTAN\n"; return 0; } else { - die "Usage: $0 --ctan-dir PKGNAME or --ctan-root (not \"@ARGV\").\n"; + die "Usage: $0 --ctan-dir[-tds] PKGNAME or --ctan-root (not \"@ARGV\").\n"; } } @@ -177,12 +181,18 @@ sub catalogue_find_ctan_path chomp ($ctan_loc); # if the package claims to have tds-ready .zip file, use it. - # except when it's erroneous. - my $tds_path = "$CTAN/install/$ctan_loc.tds.zip"; - if (-s $tds_path && $pkgname !~ /^(lcyw)$/) { - $ctan_loc = ©_to_tmpdir ($pkgname, $tds_path); - system ("unzip -q -a $ctan_loc/$pkgname.tds.zip -d $ctan_loc"); - return $ctan_loc; + if ($want_tds) { + my $tds_path = "$CTAN/install/$ctan_loc.tds.zip"; + # don't use erroneous tds. + if (-s $tds_path && $pkgname !~ /^(lcyw)$/) { + $ctan_loc = ©_to_tmpdir ($pkgname, $tds_path); + # unzip it so that tlpkg-ctan-check has files to compare. + system ("unzip -q -a $ctan_loc/$pkgname.tds.zip -d $ctan_loc"); + # remove the zip and put a flag for ctan2tds to know. + system ("rm $ctan_loc/$pkgname.tds.zip"); + system ("touch $ctan_loc/TDS_READY"); + return $ctan_loc; + } } # if the Catalogue lists the path as a single file, there are two @@ -203,7 +213,6 @@ sub catalogue_find_ctan_path return $ctan_loc; } - # copy file to temp dir and return that for ctan2tl to use. # sub copy_to_tmpdir |