]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
pciutils: avoid lspci conflict with busybox
authorNaveen Saini <naveen.kumar.saini@intel.com>
Wed, 25 May 2022 02:43:29 +0000 (10:43 +0800)
committerSteve Sakoman <steve@sakoman.com>
Tue, 31 May 2022 15:49:55 +0000 (05:49 -1000)
if virtualization is enabled as DISTRO_FEATURES, then meta-virtualization layer
enables CONFIG_LSPCI=y for busybox, which in result have conflicts with pciutils

update-alternatives: Error: not linking ..core-image-base/1.0-r0/rootfs/usr/bin/lspci
to /bin/busybox.nosuid since
..core-image-base/1.0-r0/rootfs/usr/bin/lspci exists and is not a link

So marking it as ALTERNATIVE with ALTERNATIVE_PRIORITY set to 100

Ref:
https://git.yoctoproject.org/poky/commit/meta/recipes-bsp/pciutils?id=a81af375dfc51446b21548dce2afa6a77bc02df3
https://github.com/pciutils/pciutils/commit/0b307156c92f61c1a02d232f4c6ed17e888de9a9
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox/lspci.cfg
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox_virtualization.inc#n4
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox_%25.bbappend#n1

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 257e7620a79ea50c0c59746ff9a3817d43411e39)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-bsp/pciutils/pciutils_3.7.0.bb

index 7d1740f665af8c7fb334215b2336850b5fe8c605..311e57a98b2eb73b61c5ee70f78b04cd748d2152 100644 (file)
@@ -13,7 +13,7 @@ SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
 
 SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb"
 
-inherit multilib_header pkgconfig
+inherit multilib_header pkgconfig update-alternatives
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
 PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
@@ -57,3 +57,6 @@ FILES:libpci = "${libdir}/libpci.so.*"
 SUMMARY:${PN}-ids = "PCI utilities - device ID database"
 DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils."
 RDEPENDS:${PN} += "${PN}-ids"
+
+ALTERNATIVE:${PN} = "lspci"
+ALTERNATIVE_PRIORITY = "100"