Bug 11639 - installing grub and grub-efi with confliction
Summary: installing grub and grub-efi with confliction
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M3
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-06-09 08:09 UTC by Hongxu Jia
Modified: 2018-01-22 01:27 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2017-06-09 08:09:42 UTC
*) Reproduce step
1. config

vim local.conf
---
MACHINE = "qemux86-64"
IMAGE_INSTALL_append = " grub grub-efi"
---

2. bitbake core-image-minimal
---
Transaction Summary
================================================================================
Install  33 Packages

Total size: 14 M 
Installed size: 33 M 
Running transaction check
Transaction check succeeded.
Running transaction test 
Error: Transaction check error:
  file /usr/bin/grub-editenv conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-editenv-2.02-r0.core2_64
  file /usr/bin/grub-file conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-fstest conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-glue-efi conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-menulst2cfg conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mkimage conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mklayout conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mknetdir conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mkpasswd-pbkdf2 conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mkrelpath conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mkrescue conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-mkstandalone conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-render-label conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-script-check conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/bin/grub-syslinux2cfg conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-bios-setup conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-install conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-macbless conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-ofpathname conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-probe conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64
  file /usr/sbin/grub-sparc64-setup conflicts between attempted installs of grub-efi-2.02-r0.core2_64 and grub-2.02-r0.core2_64

Error Summary
-------------


ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /buildarea/raid0/hjia/build-yocto-20170609/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.42699
---

*) analysis

While installing grub and grub-efi, there are conflict files
in ${sysconfdir} ${datadir} ${bindir} ${sbindir}.

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

For OE, we use a common package grub-common for both of pc bios and efi,
and use package grub for pc bios, grub-efi for efi.
Both of grubc and grub-efi runtime depends grub-common.