diff options
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | urpm/select.pm | 2 | ||||
-rw-r--r-- | urpm/sys.pm | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -1,3 +1,5 @@ +- Convert from bdb backend to sqlite also when not chrooted + (live upgrades, mga#29364) - cpan_testers: o skip rpm-v3 tests on known broken versions of rpm diff --git a/urpm/select.pm b/urpm/select.pm index 7225570f..b77303ae 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -759,7 +759,7 @@ sub should_we_migrate_back_rpmdb_db_version { sub migrate_forward_rpmdb_db_if_needed { my ($urpm, $state) = @_; - my ($pkg) = selected_packages_providing($urpm, $state, 'rpm') or return; + my ($pkg) = $urpm->packages_providing('rpm') or return; my $rooted_rpm_version = version->new("v" . $pkg->version); # perl_checker: $self = revision my $rpm_version = _rpm_version(); # perl_checker: $self = revision diff --git a/urpm/sys.pm b/urpm/sys.pm index bffb7ced..ce2ab3ae 100644 --- a/urpm/sys.pm +++ b/urpm/sys.pm @@ -317,7 +317,7 @@ sub migrate_rpmdb_to_sqlite { $urpm->{info}("migrating db from bdb to sqlite (rpm >= 4.16)"); # Whatever is the default backend: URPM::add_macro('_db_backend sqlite'); - if (system('chroot', $root, 'rpm', '--rebuilddb') == 0) { + if (system('rpm', '--rebuilddb', ($urpm->{root} ? ('--dbpath', "$urpm->{root}/var/lib/rpm") : @{[]})) == 0) { $urpm->{log}("rpm db converted to sqlite successfully"); } else { $urpm->{error}("rpm db conversion failed. You will not be able to run rpm >= 4.17"); |