summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-05 13:10:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-05 13:14:58 +0000
commit81ac27598414a7a9bf6bee747c8c0020ac88ed25 (patch)
treebe8d59ce165b1ea0580f9e6204b4eedfe819162f /meta
parentbfd9b03a2052579701745b172dd4297530eeae9e (diff)
downloadpoky-81ac27598414a7a9bf6bee747c8c0020ac88ed25.tar.gz
package.bbclass: Ensure all .so files get stripped
It was realised that .so files which were not marked as executable were not gettings stripped. This was wasting space in images. This patch ensures they do get processed by the code correctly. [YOCTO #3973] (From OE-Core rev: 725354886ae3650a7a4875d4c0bffcfab7e8cc40) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d37499f291..1625ebdb38 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -725,6 +725,8 @@ python split_and_strip_files () {
725 symlinks = {} 725 symlinks = {}
726 hardlinks = {} 726 hardlinks = {}
727 kernmods = [] 727 kernmods = []
728 libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
729 baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
728 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \ 730 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
729 (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'): 731 (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
730 for root, dirs, files in os.walk(dvar): 732 for root, dirs, files in os.walk(dvar):
@@ -749,7 +751,8 @@ python split_and_strip_files () {
749 # Skip broken symlinks 751 # Skip broken symlinks
750 continue 752 continue
751 # Check its an excutable 753 # Check its an excutable
752 if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH): 754 if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
755 or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
753 # If it's a symlink, and points to an ELF file, we capture the readlink target 756 # If it's a symlink, and points to an ELF file, we capture the readlink target
754 if os.path.islink(file): 757 if os.path.islink(file):
755 target = os.readlink(file) 758 target = os.readlink(file)