rendered paste body# # old_revision [fe1ec31f3dd593d62186ad1c3ebd437c7df45777]# # patch "classes/native.bbclass"# from [4286abb2006e39a81c0d035d2d6b0fc20224521c]# to [a9c9ff869708c780e6c16aaaadef635b7e39d683]# # patch "classes/package.bbclass"# from [acb86609cfd8dc43999b68ad1a1a99de51f92e53]# to [e341c0a7612ad2d9f754d0d287d2f07f64d8e5c0]# ============================================================--- classes/native.bbclass 4286abb2006e39a81c0d035d2d6b0fc20224521c+++ classes/native.bbclass a9c9ff869708c780e6c16aaaadef635b7e39d683@@ -14,6 +14,10 @@ # Need to resolve package RDEPENDS as well as DEPENDS BUILD_ALL_DEPS = "1" +# Break the circular dependency as a result of DEPENDS+# in package.bbclass+PACKAGE_DEPENDS = ""+ TARGET_ARCH = "${BUILD_ARCH}" TARGET_OS = "${BUILD_OS}" TARGET_VENDOR = "${BUILD_VENDOR}"============================================================--- classes/package.bbclass acb86609cfd8dc43999b68ad1a1a99de51f92e53+++ classes/package.bbclass e341c0a7612ad2d9f754d0d287d2f07f64d8e5c0@@ -81,6 +81,53 @@ bb.data.setVar('PACKAGES', ' '.join(packages), d) +# Function to strip a single file, called from RUNSTRIP below+# A working 'file' (one which works on the target architecture)+# is necessary for this stuff to work.+PACKAGE_DEPENDS ?= "file-native"+DEPENDS_prepend =+ "${PACKAGE_DEPENDS} "+#FIXME: this should be "" when any errors are gone!+IGNORE_STRIP_ERRORS ?= "1"++runstrip() {+ local ro st+ st=0+ if { file "$1" || {+ oewarn "file $1: failed (forced strip)" >&2+ echo 'not stripped'+ }+ } | grep -q 'not stripped'+ then+ oenote "${STRIP} $1"+ ro=+ test -w "$1" || {+ ro=1+ chmod +w "$1"+ }+ '${STRIP}' "$1"+ st=$?+ test -n "$ro" && chmod -w "$1"+ if test $st -ne 0+ then+ oewarn "runstrip: ${STRIP} $1: strip failed" >&2+ if test -n '${IGNORE_STRIP_ERRORS}'+ then+ #FIXME: remove this, it's for error detection+ if file "$1" 2>/dev/null >&2+ then+ (oefatal "${STRIP} $1: command failed" >/dev/tty)+ else+ (oefatal "file $1: command failed" >/dev/tty)+ fi+ st=0+ fi+ fi+ else+ oenote "runstrip: skip $1"+ fi+ return $st+}+ python populate_packages () { import glob, stat, errno, re @@ -166,19 +213,14 @@ dpath = os.path.dirname(fpath) bb.mkdirhier(dpath) if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1') and not os.path.islink(file) and isexec(file):- if bb.data.getVar('IGNORE_STRIP_ERRORS', d, 1) != '1':- # bail out on errors- stripfunc += "if (file %s | grep -q 'not stripped'); then echo 'Trying to strip: %s'; if ${STRIP} %s 2>&1 | grep strip; then return 1; fi; fi;\n" % (fpath, fpath, fpath)- else:- # old behaviour: ignore errors- stripfunc += "${STRIP} %s || : ;\n" % fpath+ stripfunc += "\trunstrip %s || st=1\n" % fpath ret = bb.movefile(file,fpath) if ret is None or ret == 0: raise bb.build.FuncFailed("File population failed") if not stripfunc == "": from bb import build # strip- bb.data.setVar('RUNSTRIP', '%s\nreturn 0' % stripfunc, localdata)+ bb.data.setVar('RUNSTRIP', '\tlocal st\n\tst=0\n%s\treturn $st' % stripfunc, localdata) bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata) bb.build.exec_func('RUNSTRIP', localdata) del localdata