summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/select.pm2
-rw-r--r--urpm/sys.pm2
2 files changed, 2 insertions, 2 deletions
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");