summaryrefslogtreecommitdiff
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 14:20:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 14:20:04 +0100
commitf5356062443320c29a19cfd7113128caa185b221 (patch)
treee1458660ec06896311c93ac6f17b1b4c5afc24c5 /meta/classes/package.bbclass
parent004ba67298e3e6e618df29597e9166c971a1941c (diff)
downloadopenembedded-core-f5356062443320c29a19cfd7113128caa185b221.tar.gz
openembedded-core-f5356062443320c29a19cfd7113128caa185b221.tar.bz2
openembedded-core-f5356062443320c29a19cfd7113128caa185b221.zip
Revert "meta: replace os.popen with subprocess.Popen"
This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed.
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass16
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() {
def get_directory_size(dir):
if os.listdir(dir):
- size = int(bb.process.run('du -sk %s' % dir)[0].split('\t')[0])
+ size = int(os.popen('du -sk %s' % dir).readlines()[0].split('\t')[0])
else:
size = 0
return size
@@ -1221,7 +1221,7 @@ python package_do_filedeps() {
rpfiles.append(os.path.join(root, file))
for files in chunks(rpfiles, 100):
- dep_pipe = bb.process.Popen(rpmdeps + " " + " ".join(files), shell=True).stdout
+ dep_pipe = os.popen(rpmdeps + " " + " ".join(files))
process_deps(dep_pipe, pkg, provides_files, requires_files)
@@ -1263,15 +1263,11 @@ python package_do_shlibs() {
def linux_so(root, path, file):
needs_ldconfig = False
- cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file))
+ cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
- try:
- lines = ""
- lines = bb.process.run(cmd)[0]
- # Some ".so" maybe ascii text, e.g: /usr/lib64/libpthread.so,
- # ingore those errors.
- except Exception:
- sys.exc_clear()
+ fd = os.popen(cmd)
+ lines = fd.readlines()
+ fd.close()
for l in lines:
m = re.match("\s+NEEDED\s+([^\s]*)", l)
if m: