[oe-commits] org.oe.dev package.bbclass: Make "strippedness" check overridable.

pfalcon commit openembedded-commits at lists.openembedded.org
Tue Sep 12 04:43:42 UTC 2006


package.bbclass: Make "strippedness" check overridable.
* Factor out "strippedness" substring as FILE_UNSTRIPPED_MATCH.
* Allow FILE_UNSTRIPPED_MATCH to be overriden, useful to support
other executable formats.
* Also, don't complain if .debug directory already exist
(can heppen if manually run BB tasks, e.g. for debugging).

Author: pfalcon at openembedded.org
Branch: org.openembedded.dev
Revision: da740e6fe20ac3c17064a8a58061a38e367c7147
ViewMTN: http://monotone.openembedded.org/revision.psp?id=da740e6fe20ac3c17064a8a58061a38e367c7147
Files:
1
classes/package.bbclass
Diffs:

#
# mt diff -reed5ae4efe4ce1cb698a47eda73593279e7c3f9a -rda740e6fe20ac3c17064a8a58061a38e367c7147
#
# 
# 
# patch "classes/package.bbclass"
#  from [0d163e557431bbd047d7f74d22971ee61e3a575d]
#    to [b809b7a71c7a3d1626cf5786108545e5400e63c4]
# 
============================================================
--- classes/package.bbclass	0d163e557431bbd047d7f74d22971ee61e3a575d
+++ classes/package.bbclass	b809b7a71c7a3d1626cf5786108545e5400e63c4
@@ -170,6 +170,8 @@ DEPENDS_prepend =+ "${PACKAGE_DEPENDS} "
 # is necessary for this stuff to work.
 PACKAGE_DEPENDS ?= "file-native"
 DEPENDS_prepend =+ "${PACKAGE_DEPENDS} "
+# file(1) output to match to consider a file an unstripped executable
+FILE_UNSTRIPPED_MATCH ?= "not stripped"
 #FIXME: this should be "" when any errors are gone!
 IGNORE_STRIP_ERRORS ?= "1"
 
@@ -178,9 +180,9 @@ runstrip() {
 	st=0
 	if {	file "$1" || {
 			oewarn "file $1: failed (forced strip)" >&2
-			echo 'not stripped'
+			echo '${FILE_UNSTRIPPED_MATCH}'
 		}
-	   } | grep -q 'not stripped'
+	   } | grep -q '${FILE_UNSTRIPPED_MATCH}'
 	then
 		oenote "${STRIP} $1"
 		ro=
@@ -188,7 +190,7 @@ runstrip() {
 			ro=1
 			chmod +w "$1"
 		}
-		mkdir $(dirname "$1")/.debug
+		mkdir -p $(dirname "$1")/.debug
 		debugfile="$(dirname "$1")/.debug/$(basename "$1")"
 		'${OBJCOPY}' --only-keep-debug "$1" "$debugfile"
 		'${STRIP}' "$1"






More information about the Openembedded-commits mailing list