summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-20 16:02:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 16:48:27 +0100
commit2dda838683bea563624f0588ae14fc778955fe3c (patch)
tree44b4ebc72532fd5bc0c9ac5f8a6c1249abd6583e /meta
parentb84b0733963d1f246fb93819ec246bbbe5852031 (diff)
downloadpoky-2dda838683bea563624f0588ae14fc778955fe3c.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index df5206bda9..be76b30f31 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1575,7 +1575,7 @@ SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
1575 1575
1576python package_do_shlibs() { 1576python package_do_shlibs() {
1577 import re, pipes 1577 import re, pipes
1578 import subprocess as sub 1578 import subprocess
1579 1579
1580 exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False) 1580 exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
1581 if exclude_shlibs: 1581 if exclude_shlibs:
@@ -1677,7 +1677,7 @@ python package_do_shlibs() {
1677 sonames.add(prov) 1677 sonames.add(prov)
1678 if file.endswith('.dylib') or file.endswith('.so'): 1678 if file.endswith('.dylib') or file.endswith('.so'):
1679 rpath = [] 1679 rpath = []
1680 p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE) 1680 p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
1681 out, err = p.communicate() 1681 out, err = p.communicate()
1682 # If returned successfully, process stdout for results 1682 # If returned successfully, process stdout for results
1683 if p.returncode == 0: 1683 if p.returncode == 0:
@@ -1686,7 +1686,7 @@ python package_do_shlibs() {
1686 if l.startswith('path '): 1686 if l.startswith('path '):
1687 rpath.append(l.split()[1]) 1687 rpath.append(l.split()[1])
1688 1688
1689 p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE) 1689 p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
1690 out, err = p.communicate() 1690 out, err = p.communicate()
1691 # If returned successfully, process stdout for results 1691 # If returned successfully, process stdout for results
1692 if p.returncode == 0: 1692 if p.returncode == 0:
@@ -1710,7 +1710,7 @@ python package_do_shlibs() {
1710 1710
1711 if (file.endswith(".dll") or file.endswith(".exe")): 1711 if (file.endswith(".dll") or file.endswith(".exe")):
1712 # use objdump to search for "DLL Name: .*\.dll" 1712 # use objdump to search for "DLL Name: .*\.dll"
1713 p = sub.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout = sub.PIPE, stderr= sub.PIPE) 1713 p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
1714 out, err = p.communicate() 1714 out, err = p.communicate()
1715 # process the output, grabbing all .dll names 1715 # process the output, grabbing all .dll names
1716 if p.returncode == 0: 1716 if p.returncode == 0: