summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-13 23:51:47 +0000
committerKarl Berry <karl@freefriends.org>2015-12-13 23:51:47 +0000
commitf5bb8363669fc868e296be8df0f1d2394847f29a (patch)
tree4ada498b8dd7f7707f5da2299d9dd576da76fb5f
parenta037a05b510170dc617eaa15cf2aa788ab9207b8 (diff)
report if can't find ctan dir
git-svn-id: svn://tug.org/texlive/trunk@39097 c570f23f-e606-0410-a88d-b1316a301751
-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;
}