summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-11 14:34:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-11 14:34:50 +0000
commiteda4c0bf1822616878b3edb74deac8d1612ac3f5 (patch)
treebdd59d1324da75121b09af6b48bef5d814969851 /perl-install/install
parente757acf3456457a66237d18a9f7a5c2752f03fb9 (diff)
downloaddrakx-eda4c0bf1822616878b3edb74deac8d1612ac3f5.tar
drakx-eda4c0bf1822616878b3edb74deac8d1612ac3f5.tar.gz
drakx-eda4c0bf1822616878b3edb74deac8d1612ac3f5.tar.bz2
drakx-eda4c0bf1822616878b3edb74deac8d1612ac3f5.tar.xz
drakx-eda4c0bf1822616878b3edb74deac8d1612ac3f5.zip
- do not rebuild rpmdb if it is ok
(will workaround #32547) (need perl-URPM 3.01)
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/any.pm4
-rw-r--r--perl-install/install/pkgs.pm6
3 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index d0672d97d..4a1538a7f 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- do not rebuild rpmdb if it is ok
+ (will workaround #32547) (need perl-URPM 3.01)
- adapt to perl-URPM 3.00 API to parse pubkey files
- adjust Uzbek locale (cf locales-uz change)
- sort languages in "choose language" step in text mode
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 7586932e2..6c9d60889 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -368,8 +368,8 @@ sub setPackages {
1 while $o->selectSupplMedia;
}
- #- open rpm db according to right mode needed (ie rebuilding database if upgrading)
- $o->{packages}{rpmdb} ||= install::pkgs::rpmDbOpen($o->{isUpgrade}, $o->{rpm_dbapi});
+ #- open rpm db according to right mode needed
+ $o->{packages}{rpmdb} ||= install::pkgs::rpmDbOpen('rebuild_if_needed', $o->{rpm_dbapi});
{
my $_wait = $o->wait_message('', N("Looking at packages already installed..."));
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 4c96b681a..9aada5d53 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -552,7 +552,7 @@ sub openInstallLog() {
}
sub rpmDbOpen {
- my ($b_rebuild_needed, $o_rpm_dbapi) = @_;
+ my ($b_rebuild_if_needed, $o_rpm_dbapi) = @_;
clean_rpmdb_shared_regions();
@@ -562,7 +562,9 @@ sub rpmDbOpen {
URPM::add_macro("_dbapi $wanted_dbapi");
}
- if ($b_rebuild_needed && !$o_rpm_dbapi) {
+ my $need_rebuild = $b_rebuild_if_needed && !URPM::DB::verify($::prefix);
+
+ if ($need_rebuild && !$o_rpm_dbapi) {
if (my $pid = fork()) {
waitpid $pid, 0;
$? & 0xff00 and die "rebuilding of rpm database failed";