[oe-commits] Martin Dietze : mtd-utils.inc: flexible handling of ${mtd_utils} in do_stage and do_install

git version control git at git.openembedded.org
Sun Nov 29 20:21:52 UTC 2009


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

Author: Martin Dietze <herbert at spamcop.net>
Date:   Sun Nov 29 21:12:38 2009 +0100

mtd-utils.inc: flexible handling of ${mtd_utils} in do_stage and do_install

 * the include file relies on a given list of utils to be installed, but the list is not correct for all versions which include it
 * this revision adds a check for the existence of these files before trying to install/stage them

---

 recipes/mtd/mtd-utils.inc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/recipes/mtd/mtd-utils.inc b/recipes/mtd/mtd-utils.inc
index dcf0e7c..813a09f 100644
--- a/recipes/mtd/mtd-utils.inc
+++ b/recipes/mtd/mtd-utils.inc
@@ -17,7 +17,9 @@ do_stage () {
 		install -m 0644 $f ${STAGING_INCDIR}/mtd/
 	done
 	for binary in ${mtd_utils}; do
-		install -m 0755 $binary ${STAGING_BINDIR}
+		if [ -f $binary ]; then
+			install -m 0755 $binary ${STAGING_BINDIR}
+		fi
 	done
 }
 
@@ -25,7 +27,9 @@ do_install () {
 	install -d ${D}${bindir}
 	install -d ${D}${includedir}/mtd
 	for binary in ${mtd_utils}; do
-		install -m 0755 $binary ${D}${bindir}
+		if [ -f $binary ]; then
+			install -m 0755 $binary ${D}${bindir}
+		fi
 	done
 	for f in ${S}/include/mtd/*.h; do
 		install -m 0644 $f ${D}${includedir}/mtd





More information about the Openembedded-commits mailing list