diff options
author | Karl Berry <karl@freefriends.org> | 2011-07-26 23:23:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-07-26 23:23:54 +0000 |
commit | e9b5b96e62aa1a8333723a208b797d430da33190 (patch) | |
tree | 69a06e6efc1c64027582706fd34e2ebb7dd2a2a5 /Master/tlpkg | |
parent | 4ec9ace6b030847df0da2a018e2dce6927f7eb21 (diff) |
pass .tlpsrc to from_file; have from_file not double-add .tlpsrc; otherwise, tlprm erroneously reads a file named, e.g., "ppower4" as the tlpsrc
git-svn-id: svn://tug.org/texlive/trunk@23238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 4 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlprm | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 0de0d502933..bab1db1a1bc 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -55,14 +55,14 @@ sub from_file { my $srcfile = $_[0]; my $pkgname = TeXLive::TLUtils::basename($srcfile); $pkgname =~ s/\.tlpsrc$//; - + if (! -r "$srcfile") { # if the argument is not readable as is, try looking for it in the # hierarchy where we are. The %INC hash records where packages were # found, so we use that to locate ourselves. (my $trydir = $INC{"TeXLive/TLPSRC.pm"}) =~ s,/[^/]*$,,; chomp ($trydir = `cd $trydir/../tlpsrc && pwd`); # make absolute - my $tryfile = "$trydir/$srcfile.tlpsrc"; + my $tryfile = "$trydir/$pkgname.tlpsrc"; #warn "$trydir\n$tryfile\n"; $srcfile = $tryfile if -r $tryfile; } diff --git a/Master/tlpkg/bin/tlprm b/Master/tlpkg/bin/tlprm index ff64c75993a..14a98ed4370 100755 --- a/Master/tlpkg/bin/tlprm +++ b/Master/tlpkg/bin/tlprm @@ -34,8 +34,7 @@ pod2usage("-exitstatus" => 0, "-verbose" => 2) if $opt_help; exit (&main ()); -sub main -{ +sub main { my $failure_count = 0; chomp (my $Master = `cd $mydir/../.. && pwd`); @@ -55,7 +54,7 @@ sub main } my $tlpsrc = new TeXLive::TLPSRC; - $tlpsrc->from_file ($f); + $tlpsrc->from_file ("$f.tlpsrc"); push (@files, $tlpsrc->_srcfile); # also want to remove the tlpsrc file. # The paths in tlpdb are relative to Master, so we chdir there so |