summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-04-02 12:06:30 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-04-04 20:05:42 +0200
commitb7a7defc4a6d8277adb2aec39b7b60c1165365f7 (patch)
treec7a47e38f07f024520c1c097467053ced0c9fc98
parent519c83885a19195f1f580dbcc154b6596f76ff5c (diff)
downloaddrakx-b7a7defc4a6d8277adb2aec39b7b60c1165365f7.tar
drakx-b7a7defc4a6d8277adb2aec39b7b60c1165365f7.tar.gz
drakx-b7a7defc4a6d8277adb2aec39b7b60c1165365f7.tar.bz2
drakx-b7a7defc4a6d8277adb2aec39b7b60c1165365f7.tar.xz
drakx-b7a7defc4a6d8277adb2aec39b7b60c1165365f7.zip
Fix do_pkgs_standalone::are_installed() for Live install.
When running a Live install, we generally need to chroot to the install root when checking if packages are installed. There is an exception to this, but the Live installer overrides $::prefix in this case.
-rw-r--r--perl-install/do_pkgs.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index 4c40d460e..4de82a093 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -378,7 +378,8 @@ sub are_installed {
my @l2;
my $query_all = (any { /\*/ } @l) ? 'a' : '';
- run_program::run('/bin/rpm', '>', \@l2, '-q' . $query_all, '--qf', "%{name}\n", @l); #- do not care about the return value
+ my $rooted = $::isLiveInstall && $::prefix ? { root => $::prefix } : {};
+ run_program::raw($rooted, '/bin/rpm', '>', \@l2, '-q' . $query_all, '--qf', "%{name}\n", @l); #- do not care about the return value
$query_all ? chomp_(@l2) : intersection(\@l, [ chomp_(@l2) ]); #- cannot return directly @l2 since it contains things like "package xxx is not installed"
}