All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe][Patch 1/2] parted: use update-alternatives for partprobe
@ 2018-10-05 10:05 Max Krummenacher
  2018-10-05 10:05 ` [oe][Patch 2/2] util-linux: : use update-alternatives for fsfreeze, nsenter Max Krummenacher
  0 siblings, 1 reply; 2+ messages in thread
From: Max Krummenacher @ 2018-10-05 10:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Max Krummenacher

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@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [oe][Patch 2/2] util-linux: : use update-alternatives for fsfreeze, nsenter
  2018-10-05 10:05 [oe][Patch 1/2] parted: use update-alternatives for partprobe Max Krummenacher
@ 2018-10-05 10:05 ` Max Krummenacher
  0 siblings, 0 replies; 2+ messages in thread
From: Max Krummenacher @ 2018-10-05 10:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Max Krummenacher

busybox may also provide a fsfreeze and nsenter implementation,
so use u-a to allow installing them side by side.
If one installs both, busybox and util-linux, one gets the following error
(seen on a populate-sdk run):

| ERROR: 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 do_populate_sdk extract:

| ...
| update-alternatives: Error: not linking ...sdk/image/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/sbin/fsfreeze
|     to /bin/busybox.nosuid /bin/busybox.nosuid since ...sdk/image/usr/local/oecore-x86_64/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/sbin/fsfreeze
|     exists and is not a link
| ...

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index c2e02e847a..45e2203a64 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -205,9 +205,12 @@ do_install_append_class-native () {
 
 ALTERNATIVE_PRIORITY = "80"
 
-ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
-ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall unshare"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin taskset fallocate"
+ALTERNATIVE_${PN}  = " \
+    dmesg kill more mkswap blockdev pivot_root switch_root \
+    hexdump last lastb logger mesg renice wall unshare \
+    setsid chrt flock utmpdump eject nologin taskset fallocate \
+    fsfreeze nsenter \
+"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -219,6 +222,7 @@ ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
 ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare"
 ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate"
+ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze"
 ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 rfkill.8 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
-- 
2.13.6



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-05 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 10:05 [oe][Patch 1/2] parted: use update-alternatives for partprobe Max Krummenacher
2018-10-05 10:05 ` [oe][Patch 2/2] util-linux: : use update-alternatives for fsfreeze, nsenter Max Krummenacher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.