summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpkginfo
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/tlpkginfo')
-rwxr-xr-xMaster/tlpkg/bin/tlpkginfo10
1 files changed, 8 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo
index b37c2383412..10625f738ce 100755
--- a/Master/tlpkg/bin/tlpkginfo
+++ b/Master/tlpkg/bin/tlpkginfo
@@ -109,7 +109,9 @@ sub ctaninfo {
}
-# Return the location on CTAN for PKGNAME, or 1 if no PKGNAME.
+# Return the location on CTAN for PKGNAME, or 1 if no PKGNAME or the
+# location can't be found.
+#
# If DO_COPY is nonzero, construct a working directory and return that.
#
sub find_ctan_dir {
@@ -225,6 +227,9 @@ sub find_ctan_dir {
# do last, for sake of subdirs above.
$ctan_dir = "language/hyphenation"
if $me =~ /^hyphen-/ && ! $ctan_dir;
+ } else {
+ warn "$0: could not find ctan dir for $pkgname ($me)\n";
+ return 1;
}
if ($me eq "cm") {
@@ -248,7 +253,8 @@ sub find_ctan_dir {
# prepend ctan root if not an absolute dir (this happens when we make
# a temp dir).
- $ctan_dir = "$CTAN/$ctan_dir" if $ctan_dir =~ m,^[^/],;
+ $ctan_dir = "$CTAN/$ctan_dir"
+ if defined $ctan_dir && $ctan_dir =~ m,^[^/],;
return $ctan_dir;
}