[oe-commits] Phil Blundell : busybox: tolerate empty layout_execprefix

GIT User account git at amethyst.openembedded.net
Mon Oct 20 07:24:01 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dev
Commit: a62e78edb46f5070e668c7349da51b4a6b38165e
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a62e78edb46f5070e668c7349da51b4a6b38165e

Author: Phil Blundell <philb at gnu.org>
Date:   Mon Oct 20 08:16:58 2008 +0100

busybox: tolerate empty layout_execprefix

---

 packages/busybox/busybox.inc |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/packages/busybox/busybox.inc b/packages/busybox/busybox.inc
index cc196ad..63f839e 100644
--- a/packages/busybox/busybox.inc
+++ b/packages/busybox/busybox.inc
@@ -58,6 +58,13 @@ do_compile() {
 }
 
 do_install () {
+	oe_runmake busybox.links
+	if [ "x${layout_prefix}" = "x" ]; then
+		sed 's:^/usr/:/:' < busybox.links >busybox.links.new
+		mv busybox.links.new busybox.links
+        elif [ "${layout_prefix}" != "/usr" ]; then
+		echo "warning, busybox.links will lose with this prefix"
+	fi
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
 	install -d ${D}${sysconfdir}/init.d
 	oe_runmake "PREFIX=${D}" install
@@ -67,7 +74,11 @@ do_install () {
 	install -d ${D}/busybox
 	ls ${D} -R
 
-	cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
+	for i in ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ; do
+		if [ -d $i ]; then
+			cp -dPr $i ${D}/busybox/
+		fi
+	done
 	# Move the busybox binary back to /bin
 	install -d ${D}${base_bindir}
 	mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/





More information about the Openembedded-commits mailing list