Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] e2fsprogs: use update-alt for chattr
@ 2014-06-13 18:19 Saul Wold
  2014-06-13 18:19 ` [PATCH 2/2] stat: use update-alt for stat Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: Saul Wold @ 2014-06-13 18:19 UTC (permalink / raw)
  To: openembedded-core

Both busybox and e2fsprogs provide chattr, ensure that they are delivered
to the same location and use update-alternatives to ensure the correct
links are there.

[YOCTO #6407]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 2bdd724..5302554 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -54,6 +54,8 @@ do_install () {
 	fi
 
 	oe_multilib_header ext2fs/ext2_types.h
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
 }
 
 RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
@@ -73,3 +75,10 @@ FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
 FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
 
 BBCLASSEXTEND = "native"
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-- 
1.8.3.1



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

* [PATCH 2/2] stat: use update-alt for stat
  2014-06-13 18:19 [PATCH 1/2] e2fsprogs: use update-alt for chattr Saul Wold
@ 2014-06-13 18:19 ` Saul Wold
  0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2014-06-13 18:19 UTC (permalink / raw)
  To: openembedded-core

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@linux.intel.com>
---
 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"
 
-- 
1.8.3.1



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

end of thread, other threads:[~2014-06-13 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 18:19 [PATCH 1/2] e2fsprogs: use update-alt for chattr Saul Wold
2014-06-13 18:19 ` [PATCH 2/2] stat: use update-alt for stat Saul Wold

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