summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-07-01 17:10:27 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-07-01 17:10:27 +0000
commit8acdea865038475cdb1884abe889a4175975aa2f (patch)
tree3afa347972cc6591a8da8eaa52ad0a87ffaf742a /perl-install/pkgs.pm
parent3b8e5409e6265e10709f46ac179f3ea7d014fcac (diff)
downloaddrakx-backup-do-not-use-8acdea865038475cdb1884abe889a4175975aa2f.tar
drakx-backup-do-not-use-8acdea865038475cdb1884abe889a4175975aa2f.tar.gz
drakx-backup-do-not-use-8acdea865038475cdb1884abe889a4175975aa2f.tar.bz2
drakx-backup-do-not-use-8acdea865038475cdb1884abe889a4175975aa2f.tar.xz
drakx-backup-do-not-use-8acdea865038475cdb1884abe889a4175975aa2f.zip
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index e5d4247ac..79a7ae6ca 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -2,6 +2,7 @@ package pkgs;
use diagnostics;
use strict;
+use vars qw($fd);
use common qw(:common :file);
use log;
@@ -15,12 +16,12 @@ my @skipThesesPackages = qw(XFree86-8514 XFree86-AGX XFree86-Mach32 XFree86-Mach
1;
-sub skipThisPackage { member($_[0], @skipList) }
+sub skipThisPackage { member($_[0], @skipThesesPackages) }
sub addInfosFromHeader($$) {
my ($packages, $header) = @_;
- $packages{c::headerGetEntry($header, 'name')} = {
+ $packages->{c::headerGetEntry($header, 'name')} = {
header => $header, size => c::headerGetEntry($header, 'size'),
group => c::headerGetEntry($header, 'group') || "(unknown group)",
};
@@ -37,7 +38,7 @@ sub psUsingDirectory {
open F, $_ or log::l("failed to open package $_: $!");
my $header = c::rpmReadPackageHeader($_) or log::l("failed to rpmReadPackageHeader $basename: $!");
my $name = c::headerGetEntry($header, 'name');
- addInfosFromHeader($package, $header);
+ addInfosFromHeader(\%packages, $header);
}
\%packages;
}
@@ -128,7 +129,7 @@ sub psFromHeaderListDesc {
$noSeek and last;
die "error reading header at offset ", sysseek($fd, 0, 1);
}
- addInfosFromHeader($packages, $header);
+ addInfosFromHeader(\%packages, $header);
$noSeek or $end <= sysseek($fd, 0, 1) and last;
}
@@ -149,7 +150,7 @@ sub init_db {
my $f = "$prefix/tmp/" . ($isUpgrade ? "upgrade" : "install") . ".log";
open(F, "> $f") ? log::l("opened $f") : log::l("Failed to open $f. No install log will be kept.");
- my $fd = fileno(F) || log::fd() || 2;
+ $fd = fileno(F) || log::fd() || 2;
c::rpmErrorSetCallback($fd);
# c::rpmSetVeryVerbose();