summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index bb485e767..5407cd045 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -181,10 +181,10 @@ sub install {
my ($total, $nb);
foreach my $p (@$toInstall) {
- $p->{file} ||=
- install_any::imageGetFile(sprintf "%s-%s-%s.%s.rpm",
- map { c::headerGetEntry($p->{header}, $_) }
- qw(name version release arch));
+ local *F;
+ open F, $p->{file} or die "error opening package $p->{name} (file $p->{file})";
+ $p->{header} = c::rpmReadPackageHeader(fileno F);
+
c::rpmtransAddPackage($trans, $p->{header}, $p->{file}, $isUpgrade);
$nb++;
$total += $p->{size};