From b7a7defc4a6d8277adb2aec39b7b60c1165365f7 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 2 Apr 2017 12:06:30 +0100 Subject: 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. --- perl-install/do_pkgs.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" } -- cgit v1.2.1