Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] xz: use update-alternatives
@ 2018-05-06 23:00 Allen Wild
  0 siblings, 0 replies; only message in thread
From: Allen Wild @ 2018-05-06 23:00 UTC (permalink / raw)
  To: openembedded-core

Installing xz and busybox together may cause conflicts for xz, xzcat,
unxz, and their lzma variants. In the default configuration, xzcat is
silently replaced with a symlink to busybox. If busybox is compiled with
CONFIG_XZ=y, its postinst fails during do_rootfs.

Using update-alternatives to xz handles these conflicts properly.

Signed-off-by: Allen Wild <allenwild93@gmail.com>
---
 meta/recipes-extended/xz/xz_5.2.3.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/xz/xz_5.2.3.bb b/meta/recipes-extended/xz/xz_5.2.3.bb
index c0f8b82f64..65168920d1 100644
--- a/meta/recipes-extended/xz/xz_5.2.3.bb
+++ b/meta/recipes-extended/xz/xz_5.2.3.bb
@@ -31,6 +31,11 @@ PACKAGES =+ "liblzma"
 
 FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
 
+inherit update-alternatives
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "xz xzcat unxz \
+                     lzma lzcat unlzma"
+
 BBCLASSEXTEND = "native nativesdk"
 
 export CONFIG_SHELL="/bin/sh"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-06 23:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-06 23:00 [PATCH] xz: use update-alternatives Allen Wild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox