From: Allen Wild Date: Sun, 6 May 2018 23:00:02 +0000 (-0400) Subject: xz: use update-alternatives X-Git-Tag: uninative-2.0~39 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=e48cd8423562d4b03bdf55ba04873b7582f12452;p=openembedded-core.git xz: use update-alternatives 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 Signed-off-by: Ross Burton --- 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"