package.bbclass: don't silently ignore errors when running STRIP. Set IGNORE_STRIP_ER...
authorRene Wagner <rw@handhelds.org>
Sun, 29 Jan 2006 23:41:19 +0000 (23:41 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 29 Jan 2006 23:41:19 +0000 (23:41 +0000)
classes/package.bbclass

index db479d5..dbb65cd 100644 (file)
@@ -166,7 +166,12 @@ python populate_packages () {
                        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):
-                               stripfunc += "${STRIP} %s || : ;\n" % fpath
+                               if bb.data.getVar('IGNORE_STRIP_ERRORS', d, 1) != '1':
+                                       # bail out on errors
+                                       stripfunc += "file %s | grep -q 'not stripped' && ${STRIP} %s || return 1;\n" % (fpath, fpath)
+                               else:
+                                       # old behaviour: ignore errors
+                                       stripfunc += "${STRIP} %s || : ;\n" % fpath
                        ret = bb.movefile(file,fpath)
                        if ret is None or ret == 0:
                                raise bb.build.FuncFailed("File population failed")