mirror of
https://git.yoctoproject.org/poky
synced 2026-09-25 07:36:23 +02:00
package: Use subprocess to be consistent with the rest of the class
Using 'sub' in one function just confuses things, standardise and fix formatting of the parameters too. (From OE-Core rev: a740c638148ed7236c49eed55ae9a15b94e55b9f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1575,7 +1575,7 @@ SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
|
|||||||
|
|
||||||
python package_do_shlibs() {
|
python package_do_shlibs() {
|
||||||
import re, pipes
|
import re, pipes
|
||||||
import subprocess as sub
|
import subprocess
|
||||||
|
|
||||||
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
|
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
|
||||||
if exclude_shlibs:
|
if exclude_shlibs:
|
||||||
@@ -1677,7 +1677,7 @@ python package_do_shlibs() {
|
|||||||
sonames.add(prov)
|
sonames.add(prov)
|
||||||
if file.endswith('.dylib') or file.endswith('.so'):
|
if file.endswith('.dylib') or file.endswith('.so'):
|
||||||
rpath = []
|
rpath = []
|
||||||
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
|
p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
# If returned successfully, process stdout for results
|
# If returned successfully, process stdout for results
|
||||||
if p.returncode == 0:
|
if p.returncode == 0:
|
||||||
@@ -1686,7 +1686,7 @@ python package_do_shlibs() {
|
|||||||
if l.startswith('path '):
|
if l.startswith('path '):
|
||||||
rpath.append(l.split()[1])
|
rpath.append(l.split()[1])
|
||||||
|
|
||||||
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
|
p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
# If returned successfully, process stdout for results
|
# If returned successfully, process stdout for results
|
||||||
if p.returncode == 0:
|
if p.returncode == 0:
|
||||||
@@ -1710,7 +1710,7 @@ python package_do_shlibs() {
|
|||||||
|
|
||||||
if (file.endswith(".dll") or file.endswith(".exe")):
|
if (file.endswith(".dll") or file.endswith(".exe")):
|
||||||
# use objdump to search for "DLL Name: .*\.dll"
|
# use objdump to search for "DLL Name: .*\.dll"
|
||||||
p = sub.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout = sub.PIPE, stderr= sub.PIPE)
|
p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
# process the output, grabbing all .dll names
|
# process the output, grabbing all .dll names
|
||||||
if p.returncode == 0:
|
if p.returncode == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user