From: Paul Sokolovsky Date: Tue, 12 Sep 2006 03:06:23 +0000 (+0000) Subject: package.bbclass: Make "strippedness" check overridable. X-Git-Tag: Release-2010-05/1~9453^2~835^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ab89539ad667366b53663c2a1e83d9e82e36a1f;p=openembedded.git 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). --- diff --git a/classes/package.bbclass b/classes/package.bbclass index 03999a54ef..8dbc5d7b25 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -170,6 +170,8 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst # 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"