[oe-commits] [openembedded-core] 37/44: mtd-utils: fix flash_eraseall installation conflict

git at git.openembedded.org git at git.openembedded.org
Sat Dec 2 11:27:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 21d5a52d86a4090f7ddb1a9eb41bb143261f890e
Author: Andrej Valek <andrej.valek at siemens.com>
AuthorDate: Thu Nov 23 10:38:58 2017 +0100

    mtd-utils: fix flash_eraseall installation conflict
    
    override correctly busybox's applet when CONFIG_FLASH_ERASEALL=y is set
    
    Error: update-alternatives: not linking /builds/image/1.0-r0/rootfs/usr/
    sbin/flash_eraseall to /bin/busybox.nosuid since /builds/image/1.0-r0/
    rootfs/usr/sbin/flash_eraseall exists and is not a link
    
    Signed-off-by: Andrej Valek <andrej.valek at siemens.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-devtools/mtd/mtd-utils_git.bb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 4fbc54f..48ba2ee 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -5,7 +5,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig update-alternatives
 
 DEPENDS = "zlib lzo e2fsprogs util-linux"
 
@@ -30,6 +30,11 @@ PACKAGECONFIG[xattr] = ",,acl,"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
 
+ALTERNATIVE_${PN} = "flash_eraseall"
+ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
+# Use higher priority than busybox's flash_eraseall (created when built with CONFIG_FLASH_ERASEALL)
+ALTERNATIVE_PRIORITY[flash_eraseall] = "100"
+
 do_install () {
 	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list