From 4c91aaced1cb66d37bd1aae558b4e3364555d1cc Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 2 Apr 2017 12:19:44 +0100 Subject: Fix do_pkgs_standalone::remove() for Live install. When running a Live install, we generally need to chroot to the install root when removing packages. This was causing os-prober to be removed from the Live system instead of from the installed system when the "Probe foreign OS" option was unchecked. --- 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 4de82a093..e4b9b0198 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -388,7 +388,8 @@ sub remove { my $_wait = $do->in && $do->in->wait_message(N("Please wait"), N("Removing packages...")); $do->in->suspend if $do->in; log::explanations("removing packages @l"); - my $ret = system('rpm', '-e', @l) == 0; + my @wrapper = $::isLiveInstall && $::prefix ? ('chroot', $::prefix) : (); + my $ret = system(@wrapper, 'rpm', '-e', @l) == 0; $do->in->resume if $do->in; $ret; } -- cgit v1.2.1