diff options
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 48f95e6f260..32119ea0f75 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -243,7 +243,8 @@ sub remove_tlpobj { The C<from_file> function initializes the C<TLPDB> if the root was not given at generation time. See L<TLPDB::new> for more information. -It returns the actual number of packages (TLPOBJs) read from C<$filename>. +It returns the actual number of packages (TLPOBJs) read from +C<$filename>, and zero if there are problems (and gives warnings). =cut @@ -290,9 +291,8 @@ sub from_file { } elsif (-d "$rootpath/$Archive") { $media = 'local_compressed'; } else { - # we cannot find the right type, return undefined, that should - # make people notice - tlwarn("Cannot determine type of tlpdb!\n"); + # we cannot find the right type, return zero, hope people notice + tlwarn("Cannot determine type of tlpdb from $rootpath!\n"); return 0; } } @@ -1706,9 +1706,10 @@ sub not_virtual_install_package { # we have to write out the tlpobj file since it is contained in the # archives (.tar.xz) but at DVD install time we don't have them my $tlpod = $totlpdb->root . "/tlpkg/tlpobj"; - mkdirhier( $tlpod ); + mkdirhier($tlpod); my $count = 0; - until (open(TMP,">$tlpod/".$tlpobj->name.".tlpobj")) { + my $tlpobj_file = ">$tlpod/" . $tlpobj->name . ".tlpobj"; + until (open(TMP, $tlpobj_file)) { # The open might fail for no good reason on Windows. # Try again for a while, but not forever. if ($count++ == 100) { die "$0: open($tlpobj_file) failed: $!"; } |