summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPDB.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-21 22:46:16 +0000
committerKarl Berry <karl@freefriends.org>2021-12-21 22:46:16 +0000
commite59c85deee5e92c444551086c1f2ced999b39d25 (patch)
tree2e1416230c53eb3eb6531170d1a691f9426a3b62 /Master/tlpkg/TeXLive/TLPDB.pm
parent1d19bd5dcb878354da2efe13630de7600210a113 (diff)
use strict; use warnings; declarations, filehandle barewords, our @disabled
git-svn-id: svn://tug.org/texlive/trunk@61372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm19
1 files changed, 12 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 1f258c4451e..be818fccaed 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -4,6 +4,7 @@
# This file is licensed under the GNU General Public License version 2
# or any later version.
+use strict; use warnings;
package TeXLive::TLPDB;
my $svnrev = '$Revision$';
@@ -281,6 +282,7 @@ sub from_file {
my $is_verified = 0;
# do media detection
my $rootpath = $self->root;
+ my $media;
if ($rootpath =~ m,https?://|ftp://,) {
$media = 'NET';
} elsif ($rootpath =~ m,$TeXLive::TLUtils::SshURIRegex,) {
@@ -423,7 +425,7 @@ sub writeout {
tlwarn("TLPDB: cannot writeout a virtual tlpdb\n");
return 0;
}
- my $fd = (@_ ? $_[0] : STDOUT);
+ my $fd = (@_ ? $_[0] : *STDOUT);
foreach (sort keys %{$self->{'tlps'}}) {
TeXLive::TLUtils::dddebug("writeout: tlpname=$_ ",
$self->{'tlps'}{$_}->name, "\n");
@@ -990,7 +992,7 @@ available architectures as packages with revision number -1.
sub generate_packagelist {
my $self = shift;
- my $fd = (@_ ? $_[0] : STDOUT);
+ my $fd = (@_ ? $_[0] : *STDOUT);
foreach (sort $self->list_packages) {
print $fd $self->get_package($_)->name, " ",
$self->get_package($_)->revision, "\n";
@@ -1017,7 +1019,7 @@ sub generate_listfiles {
$destdir = TeXLive::TLPDB->listdir;
}
foreach (sort $self->list_package) {
- $tlp = $self->get_package($_);
+ my $tlp = $self->get_package($_);
$self->_generate_listfile($tlp, $destdir);
}
}
@@ -1465,7 +1467,7 @@ sub sizes_of_packages_with_deps {
sub _sizes_of_packages {
my ($self, $with_deps, $opt_src, $opt_doc, $arch_list_ref, @packs) = @_;
@packs || ( @packs = $self->list_packages() );
- my @expacks;
+ my @exppacks;
if ($with_deps) {
# don't expand collection->collection dependencies
#@exppacks = $self->expand_dependencies('-no-collections', $self, @packs);
@@ -1623,7 +1625,8 @@ sub install_package_files {
my ($tlpobjfile, $anotherfile) = <$tmpdir/tlpkg/tlpobj/*.tlpobj>;
if (defined($anotherfile)) {
# we found several tlpobj files, that is not allowed, stop
- tlwarn("TLPDB::install_package_files: several tlpobj files in $what in tlpkg/tlpobj/, stopping!\n");
+ tlwarn("TLPDB::install_package_files: several tlpobj files "
+ . "($tlpobjfile, $anotherfile) in tlpkg/tlpobj/, stopping!\n");
next;
}
# - read the tlpobj from there
@@ -1651,8 +1654,10 @@ sub install_package_files {
@installfiles = map { s!^$RelocPrefix/!!; $_; } @installfiles;
# if the first argument of _install_data is scalar, it is the
# place from where files should be installed
- if (!_install_data ($tmpdir, \@installfiles, $reloc, \@installfiles, $self)) {
- tlwarn("TLPDB::install_package_files: couldn't install $what!\n");
+ if (!_install_data ($tmpdir, \@installfiles, $reloc, \@installfiles,
+ $self)) {
+ tlwarn("TLPDB::install_package_files: couldn't install_data files: "
+ . "@installfiles\n");
next;
}
if ($reloc) {