summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpkginfo
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/tlpkginfo')
-rwxr-xr-xMaster/tlpkg/bin/tlpkginfo25
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 = &copy_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 = &copy_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