diff options
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/any.pm | 4 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 6 |
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"; |