summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-20 15:15:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-24 11:52:27 +0100
commitadea90740d45628685d0828b3103109432c25857 (patch)
treede9b7412ee9be68611111fe9bc49e204e683872d /meta/lib/oe/package.py
parent1d8924f1727d3d3c954d4c9002fe8827552bf5bf (diff)
downloadpoky-adea90740d45628685d0828b3103109432c25857.tar.gz
package/package_manager: multiprocess_exec -> multiprocess_launch
After this replacement, the parent exception handling works so we don't need subprocess wrapping with bb.error in the underlying functions. The underlying contexts also have better module handling so the imports can be cleaned up. (From OE-Core rev: aa8260adf53139d776a2affe6118d28b295c1fab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r--meta/lib/oe/package.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 4255143371..fa3428ad61 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -1,3 +1,4 @@
1import stat
1import mmap 2import mmap
2import subprocess 3import subprocess
3 4
@@ -11,8 +12,6 @@ def runstrip(arg):
11 # 8 - shared library 12 # 8 - shared library
12 # 16 - kernel module 13 # 16 - kernel module
13 14
14 import stat, subprocess
15
16 (file, elftype, strip) = arg 15 (file, elftype, strip) = arg
17 16
18 newmode = None 17 newmode = None
@@ -37,16 +36,11 @@ def runstrip(arg):
37 stripcmd.append(file) 36 stripcmd.append(file)
38 bb.debug(1, "runstrip: %s" % stripcmd) 37 bb.debug(1, "runstrip: %s" % stripcmd)
39 38
40 try: 39 output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
41 output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
42 except subprocess.CalledProcessError as e:
43 bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output))
44 40
45 if newmode: 41 if newmode:
46 os.chmod(file, origmode) 42 os.chmod(file, origmode)
47 43
48 return
49
50# Detect .ko module by searching for "vermagic=" string 44# Detect .ko module by searching for "vermagic=" string
51def is_kernel_module(path): 45def is_kernel_module(path):
52 with open(path) as f: 46 with open(path) as f:
@@ -164,8 +158,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripp
164 elf_file = int(elffiles[file]) 158 elf_file = int(elffiles[file])
165 sfiles.append((file, elf_file, strip_cmd)) 159 sfiles.append((file, elf_file, strip_cmd))
166 160
167 oe.utils.multiprocess_exec(sfiles, runstrip) 161 oe.utils.multiprocess_launch(runstrip, sfiles, d)
168
169 162
170 163
171def file_translate(file): 164def file_translate(file):