From f5356062443320c29a19cfd7113128caa185b221 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 30 May 2012 14:20:04 +0100 Subject: 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. --- meta/classes/debian.bbclass | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'meta/classes/debian.bbclass') diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 963d11c129..3637e2ebe7 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass @@ -60,14 +60,10 @@ python debian_package_name_hook () { for f in files: if so_re.match(f): fp = os.path.join(root, f) - cmd = (d.getVar('BUILD_PREFIX', True) or "") + "objdump -p " + fp - 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() + cmd = (d.getVar('BUILD_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: -- cgit v1.2.3