summaryrefslogtreecommitdiffstats
path: root/meta/classes/debian.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-29 14:10:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-01 15:54:02 +0000
commit244f107c1f11bb74b5a489e4f24eac93706aa584 (patch)
tree1a7a619fe6ece0268ebc3b9f8dda0351b1b20429 /meta/classes/debian.bbclass
parented931d0314e4d1bb5230b266d2ec6d55dcb63df6 (diff)
downloadast2050-yocto-poky-244f107c1f11bb74b5a489e4f24eac93706aa584.zip
ast2050-yocto-poky-244f107c1f11bb74b5a489e4f24eac93706aa584.tar.gz
package: Create global package file list and use throughout PACKAGEFUNCS
Currently we do a signficant amount of tree traversal in many different places which in inefficient. We can assume that the files don't change and cache the file list which gives an efficiency improvement which this patch does using a global variable. (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907) (From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/debian.bbclass')
-rw-r--r--meta/classes/debian.bbclass28
1 files changed, 13 insertions, 15 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 45f01e4..d7ea151 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -51,23 +51,21 @@ python debian_package_name_hook () {
sonames = []
has_bins = 0
has_libs = 0
- pkg_dir = os.path.join(pkgdest, orig_pkg)
- for root, dirs, files in os.walk(pkg_dir):
- if bin_re.match(root) and files:
+ for file in pkgfiles[orig_pkg]:
+ root = os.path.dirname(file)
+ if bin_re.match(root):
has_bins = 1
- if lib_re.match(root) and files:
+ if lib_re.match(root):
has_libs = 1
- for f in files:
- if so_re.match(f):
- fp = os.path.join(root, f)
- cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null"
- fd = os.popen(cmd)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s+SONAME\s+([^\s]*)", l)
- if m and not m.group(1) in sonames:
- sonames.append(m.group(1))
+ if so_re.match(os.path.basename(file)):
+ cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + file + " 2>/dev/null"
+ fd = os.popen(cmd)
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ m = re.match("\s+SONAME\s+([^\s]*)", l)
+ if m and not m.group(1) in sonames:
+ sonames.append(m.group(1))
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
OpenPOWER on IntegriCloud