summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-15 17:56:18 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-15 17:56:18 +0000
commit3b81169be1f89b6c9f72c599c91f74e906fa8249 (patch)
treee4e6ba60d8523b30d72d5e15791e7dff447eba65 /perl-install/install_any.pm
parent7c4437b8f45b8be90d8909433a93c29558c443e7 (diff)
downloaddrakx-backup-do-not-use-3b81169be1f89b6c9f72c599c91f74e906fa8249.tar
drakx-backup-do-not-use-3b81169be1f89b6c9f72c599c91f74e906fa8249.tar.gz
drakx-backup-do-not-use-3b81169be1f89b6c9f72c599c91f74e906fa8249.tar.bz2
drakx-backup-do-not-use-3b81169be1f89b6c9f72c599c91f74e906fa8249.tar.xz
drakx-backup-do-not-use-3b81169be1f89b6c9f72c599c91f74e906fa8249.zip
synced with other module updated.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 9d09ad9af..165025f21 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -195,7 +195,7 @@ sub allowNVIDIA_rpms {
foreach (keys %{$packages->{names}}) {
my ($ext, $version, $release) = /kernel[^-]*(-smp|-enterprise|-secure)?(?:-(\d.*?)\.(\d+mdk))?$/ or next;
my $p = pkgs::packageByName($packages, $_);
- pkgs::packageSelectedOrInstalled($p) or next;
+ $p->flag_available or next;
$version or ($version, $release) = ($p->version, $p->release);
my $name = "NVIDIA_kernel-$version-$release$ext";
pkgs::packageByName($packages, $name) or return;
@@ -299,12 +299,15 @@ sub preConfigureTimezone {
}
sub setPackages {
- my ($o) = @_;
+ my ($o, $rebuild_needed) = @_;
require pkgs;
- if (!$o->{packages} || is_empty_hash_ref($o->{packages}{names})) {
+ if (!$o->{packages} || is_empty_hash_ref($o->{packages}{depslist})) {
$o->{packages} = pkgs::psUsingHdlists($o->{prefix}, $o->{method});
+ #- open rpm db according to right mode needed.
+ $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}, $rebuild_needed);
+
pkgs::getDeps($o->{prefix}, $o->{packages});
pkgs::selectPackage($o->{packages},
pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);
@@ -322,6 +325,9 @@ sub setPackages {
#- this has to be done to make sure necessary files for urpmi are
#- present.
pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method}, $o->{packages});
+
+ #- open rpm db (always without rebuilding db, it should be false at this point).
+ $o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix});
}
}