diff options
Diffstat (limited to 'meta/classes/package.bbclass')
| -rw-r--r-- | meta/classes/package.bbclass | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index bc83bfbf4e..41139ef921 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -1061,7 +1061,7 @@ python emit_pkgdata() { | |||
| 1061 | 1061 | ||
| 1062 | def get_directory_size(dir): | 1062 | def get_directory_size(dir): |
| 1063 | if os.listdir(dir): | 1063 | if os.listdir(dir): |
| 1064 | size = int(bb.process.run('du -sk %s' % dir)[0].split('\t')[0]) | 1064 | size = int(os.popen('du -sk %s' % dir).readlines()[0].split('\t')[0]) |
| 1065 | else: | 1065 | else: |
| 1066 | size = 0 | 1066 | size = 0 |
| 1067 | return size | 1067 | return size |
| @@ -1221,7 +1221,7 @@ python package_do_filedeps() { | |||
| 1221 | rpfiles.append(os.path.join(root, file)) | 1221 | rpfiles.append(os.path.join(root, file)) |
| 1222 | 1222 | ||
| 1223 | for files in chunks(rpfiles, 100): | 1223 | for files in chunks(rpfiles, 100): |
| 1224 | dep_pipe = bb.process.Popen(rpmdeps + " " + " ".join(files), shell=True).stdout | 1224 | dep_pipe = os.popen(rpmdeps + " " + " ".join(files)) |
| 1225 | 1225 | ||
| 1226 | process_deps(dep_pipe, pkg, provides_files, requires_files) | 1226 | process_deps(dep_pipe, pkg, provides_files, requires_files) |
| 1227 | 1227 | ||
| @@ -1263,15 +1263,11 @@ python package_do_shlibs() { | |||
| 1263 | 1263 | ||
| 1264 | def linux_so(root, path, file): | 1264 | def linux_so(root, path, file): |
| 1265 | needs_ldconfig = False | 1265 | needs_ldconfig = False |
| 1266 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) | 1266 | cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null" |
| 1267 | cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd) | 1267 | cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd) |
| 1268 | try: | 1268 | fd = os.popen(cmd) |
| 1269 | lines = "" | 1269 | lines = fd.readlines() |
| 1270 | lines = bb.process.run(cmd)[0] | 1270 | fd.close() |
| 1271 | # Some ".so" maybe ascii text, e.g: /usr/lib64/libpthread.so, | ||
| 1272 | # ingore those errors. | ||
| 1273 | except Exception: | ||
| 1274 | sys.exc_clear() | ||
| 1275 | for l in lines: | 1271 | for l in lines: |
| 1276 | m = re.match("\s+NEEDED\s+([^\s]*)", l) | 1272 | m = re.match("\s+NEEDED\s+([^\s]*)", l) |
| 1277 | if m: | 1273 | if m: |
