]> code.ossystems Code Review - openembedded-core.git/commitdiff
package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Feb 2018 14:40:55 +0000 (14:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Feb 2018 15:07:30 +0000 (15:07 +0000)
There are cases where its useful to allow only a select few files
to be excluded from the package stripping mechanism. Currently
this isn't possible so add a variable to allow this.

This is to be used sparingly as in general the core code should be
doing the right thing. This is better than the alternative of leaving the whole
package unstripped.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 6a7f35a3e7871502ff9784b39db611e5a6404866..90e523693dbb49c735c34acba7a763190bd6e796 100644 (file)
@@ -946,6 +946,7 @@ python split_and_strip_files () {
     inodes = {}
     libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
     baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
+    skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
     if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
             d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
         for root, dirs, files in cpath.walk(dvar):
@@ -961,6 +962,9 @@ python split_and_strip_files () {
                 if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
                     continue
 
+                if file in skipfiles:
+                    continue
+
                 try:
                     ltarget = cpath.realpath(file, dvar, False)
                     s = cpath.lstat(ltarget)