[oe-commits] [openembedded-core] 03/07: grub/grub-efi: fix conflict

git at git.openembedded.org git at git.openembedded.org
Mon May 7 14:58:24 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch rocko
in repository openembedded-core.

commit 60c360c0561f1ff5ff2135c4557f5992f9485617
Author: Hongxu Jia <hongxu.jia at windriver.com>
AuthorDate: Sat Apr 28 09:57:08 2018 +0800

    grub/grub-efi: fix conflict
    
    While installing grub and grub-efi, there are conflict files
    in ${sysconfdir} ${datadir} ${bindir} ${sbindir}.
    
    - Since all of the conflicted files are tools which is
      common for grub and grub-efi, we split them (except
      grub-editenv) to grub-common in grub.
    
    - The package grub-common runtime depends grub-editenv
    
    - The package grub-editenv runtime provides grub-efi-editenv
    
    - Remove SYSROOT_DIRS_BLACKLIST
    
    - The recipe grub-efi does not generate the duplicated files
      and use runtime depends grub-common to instead
    
    Debian and Fedora do the similar thing.
    
    Debian use a common package grub-common for both of pc bios and efi,
    and use package grub-pc-bin for pc bios, grub-efi-amd64-bin for efi.
    Both of grub-pc-bin and grub-efi-amd64-bin requires grub-common.
    https://packages.debian.org/sid/grub-common
    https://packages.debian.org/jessie/grub-pc-bin
    https://packages.debian.org/jessie/grub-efi-amd64-bin
    
    Fedora use a common package grub2-tools for both of pc bios and efi,
    and use package grub2 for pc bios, grub2-efi-modules for efi.
    Both of grub2 and grub2-efi-modules requires grub2-tools.
    https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-tools-2.02-0.34.fc24.x86_64.html
    https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-2.02-0.34.fc24.x86_64.html
    https://www.rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/g/grub2-efi-modules-2.02-0.34.fc24.x86_64.html
    
    [YOCTO #11639]
    
    Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-bsp/grub/grub-efi_2.02.bb |  9 +++++----
 meta/recipes-bsp/grub/grub2.inc        |  8 --------
 meta/recipes-bsp/grub/grub_2.02.bb     | 14 +++++++++++++-
 3 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 128da16..112a99d 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -3,7 +3,7 @@ require grub2.inc
 GRUBPLATFORM = "efi"
 
 DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype"
+RDEPENDS_${PN}_class-target = "diffutils freetype grub-common"
 
 SRC_URI += " \
            file://cfg \
@@ -41,7 +41,9 @@ do_install_class-native() {
 	install -m 755 grub-mkimage ${D}${bindir}
 }
 
-do_install_append_class-target() {
+do_install_class-target() {
+    oe_runmake 'DESTDIR=${D}' -C grub-core install
+
     # Remove build host references...
     find "${D}" -name modinfo.sh -type f -exec \
         sed -i \
@@ -69,8 +71,7 @@ do_deploy_class-native() {
 
 addtask deploy after do_install before do_build
 
-FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
-                ${datadir}/grub \
+FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
                 "
 
 # 64-bit binaries are expected for the bootloader with an x32 userland
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 28f96bb..79a84e9 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -67,12 +67,4 @@ do_configure_prepend() {
 	${S}/autogen.sh )
 }
 
-# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
-# conflicted, remove it since no one uses it.
-SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
-
-PACKAGES =+ "${PN}-editenv"
-
-FILES_${PN}-editenv = "${bindir}/grub-editenv"
-RDEPENDS_${PN} += "${PN}-editenv"
 RDEPENDS_${PN}_class-native = ""
diff --git a/meta/recipes-bsp/grub/grub_2.02.bb b/meta/recipes-bsp/grub/grub_2.02.bb
index 3e61f6a..e097375 100644
--- a/meta/recipes-bsp/grub/grub_2.02.bb
+++ b/meta/recipes-bsp/grub/grub_2.02.bb
@@ -1,6 +1,18 @@
 require grub2.inc
 
-RDEPENDS_${PN} += "diffutils freetype"
+RDEPENDS_${PN}-common += "${PN}-editenv"
+RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
+
+RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
+
+PACKAGES =+ "${PN}-editenv ${PN}-common"
+FILES_${PN}-editenv = "${bindir}/grub-editenv"
+FILES_${PN}-common = " \
+    ${bindir} \
+    ${sysconfdir} \
+    ${sbindir} \
+    ${datadir}/grub \
+"
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list