[oe-commits] Saul Wold : stat: use update-alt for stat

git at git.openembedded.org git at git.openembedded.org
Sat Jun 14 07:44:34 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 2abc776393f8b5574dd9cf614ff1ae4b460e4d8c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2abc776393f8b5574dd9cf614ff1ae4b460e4d8c

Author: Saul Wold <sgw at linux.intel.com>
Date:   Fri Jun 13 10:48:13 2014 -0700

stat: use update-alt for stat

Three different recipes provide the stat program, busybox, coreutils and stat.
Ensure that they are installed to the same place and use update-alternative
with the correct priorities to have the correct binary installed.

[YOCTO #6415]

Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-extended/stat/stat_3.3.bb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
index c9edb1d..6754fb8 100644
--- a/meta/recipes-extended/stat/stat_3.3.bb
+++ b/meta/recipes-extended/stat/stat_3.3.bb
@@ -12,10 +12,17 @@ SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
 SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
 
 do_install() {
-	install -d ${D}${bindir} ${D}${mandir}/man1
-	install -m 755 stat ${D}${bindir}
+	install -d ${D}${base_bindir} ${D}${mandir}/man1
+	install -m 755 stat ${D}${base_bindir}/stat.stat
 	install -m 644 stat.1 ${D}${mandir}/man1
 }
 
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "stat"
+ALTERNATIVE_PRIORITY[stat] = "200"
+ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat"
+ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat"
+
 BBCLASSEXTEND = "native"
 



More information about the Openembedded-commits mailing list