[OE-core] [oe][Patch 1/2] parted: use update-alternatives for partprobe

Max Krummenacher max.oss.09 at gmail.com
Fri Oct 5 10:05:17 UTC 2018


busybox may also provide a partprobe implementation, so use u-a to allow
installing them side by side.
If one installs both, busybox and parted, one gets the following error:

| ERROR: image do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
| then please place them into pkg_postinst_ontarget_${PN} ().
| Deferring to first boot via 'exit 1' is no longer supported.

And the coresponding log.do_rootfs extract:

| ...
| update-alternatives: Error: not linking ...image/rootfs/usr/sbin/partprobe to /bin/busybox.nosuid since ...image/rootfs/usr/sbin/partprobe exists and is not a link
| ...

Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
---
 meta/recipes-extended/parted/parted_3.2.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
index ab30108bf2..6189fd2246 100644
--- a/meta/recipes-extended/parted/parted_3.2.bb
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -48,3 +48,9 @@ do_install_ptest() {
 }
 
 RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "partprobe"
+ALTERNATIVE_LINK_NAME[partprobe] = "${sbindir}/partprobe"
-- 
2.13.6




More information about the Openembedded-core mailing list