Mageia Bugzilla – Attachment 9175 Details for
Bug 20620
Erroneous report that grub2 cannot be installed at end of Live install
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Patch to make do_pkgs_standalone::are_installed() use a chroot in a Live install
0002-Fix-do_pkgs_standalone-are_installed-for-Live-instal.patch (text/plain), 1.20 KB, created by
Martin Whitaker
on 2017-04-02 22:33:10 CEST
(
hide
)
Description:
Patch to make do_pkgs_standalone::are_installed() use a chroot in a Live install
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-04-02 22:33:10 CEST
Size:
1.20 KB
patch
obsolete
>From d6f2ce32d258c689f6658ad3c7c3fc892a3a4480 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sun, 2 Apr 2017 12:06:30 +0100 >Subject: [PATCH 2/4] 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. > >diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm >index 4c40d46..4de82a0 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" > } > >-- >2.10.2 >
From d6f2ce32d258c689f6658ad3c7c3fc892a3a4480 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sun, 2 Apr 2017 12:06:30 +0100 Subject: [PATCH 2/4] 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. diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index 4c40d46..4de82a0 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" } -- 2.10.2
View Attachment As Raw
Actions:
View
Attachments on
bug 20620
:
9174
| 9175 |
9176
|
9177
|
9182