summaryrefslogtreecommitdiffstats
path: root/perl-install/install/pkgs.pm
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/pkgs.pm
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/pkgs.pm')
-rw-r--r--perl-install/install/pkgs.pm6
1 files changed, 4 insertions, 2 deletions
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";