summaryrefslogtreecommitdiffstats
path: root/meta/classes/debian.bbclass
diff options
context:
space:
mode:
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 45f01e43cd..d7ea151a5d 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -51,23 +51,21 @@ python debian_package_name_hook () {
51 sonames = [] 51 sonames = []
52 has_bins = 0 52 has_bins = 0
53 has_libs = 0 53 has_libs = 0
54 pkg_dir = os.path.join(pkgdest, orig_pkg) 54 for file in pkgfiles[orig_pkg]:
55 for root, dirs, files in os.walk(pkg_dir): 55 root = os.path.dirname(file)
56 if bin_re.match(root) and files: 56 if bin_re.match(root):
57 has_bins = 1 57 has_bins = 1
58 if lib_re.match(root) and files: 58 if lib_re.match(root):
59 has_libs = 1 59 has_libs = 1
60 for f in files: 60 if so_re.match(os.path.basename(file)):
61 if so_re.match(f): 61 cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + file + " 2>/dev/null"
62 fp = os.path.join(root, f) 62 fd = os.popen(cmd)
63 cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null" 63 lines = fd.readlines()
64 fd = os.popen(cmd) 64 fd.close()
65 lines = fd.readlines() 65 for l in lines:
66 fd.close() 66 m = re.match("\s+SONAME\s+([^\s]*)", l)
67 for l in lines: 67 if m and not m.group(1) in sonames:
68 m = re.match("\s+SONAME\s+([^\s]*)", l) 68 sonames.append(m.group(1))
69 if m and not m.group(1) in sonames:
70 sonames.append(m.group(1))
71 69
72 bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames)) 70 bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
73 soname = None 71 soname = None