summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm18
1 files changed, 8 insertions, 10 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 1ff426e7833..d7ca2818eb0 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -184,10 +184,8 @@ sub remove_package {
=item C<< $tlpdb->from_file($filename) >>
-The C<from_file> function initializes the C<TLPDB> in case the
-root was not given at generation time. If C<$filename> begins
-with C<http://> or C<ftp://>, the program C<wget> is used to download
-the file. The prefix C<file:/> is treated the expected way.
+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>.
@@ -233,19 +231,19 @@ sub from_file {
# better to check both, the return value AND the existence of the file
if ($ret && (-r "$lzmafile")) {
# ok, let the fun begin
- debug("Un-lzmaing $lzmafile to $tlpdbfile\n");
+ debug("un-lzmaing $lzmafile to $tlpdbfile\n");
# lzmadec *hopefully* returns 0 on success and anything else on failure
# we don't have to negate since not zero means error in the shell
# and thus in perl true
- if (system("$::progs{'lzmadec'} < $lzmafile_quote > $tlpdbfile_quote")) {
- debug("Un-lzmaing $lzmafile did not succeed, try normally\n");
+ if (system("$::progs{'lzmadec'} <$lzmafile_quote >$tlpdbfile_quote")) {
+ debug("un-lzmaing $lzmafile failed, tryin gplain file\n");
# to be sure we unlink the lzma file and the tlpdbfile
unlink($lzmafile);
unlink($tlpdbfile);
} else {
unlink($lzmafile);
- open $retfh, "<$tlpdbfile" or die"Cannot open $tlpdbfile!";
- debug("Ok, found the uncompressed lzma file!\n");
+ open $retfh, "<$tlpdbfile" or die "open($tlpdbfile) failed: $!";
+ debug("found the uncompressed lzma file\n");
}
}
} else {
@@ -267,7 +265,7 @@ sub from_file {
my $ret = 0;
do {
my $tlp = TeXLive::TLPOBJ->new;
- debug("creating tlp from $path...\n");
+ ddebug("creating tlp from $path...\n");
$ret = $tlp->from_fh($retfh,1);
if ($ret) {
$self->add_tlpobj($tlp);