diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-20 15:15:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-24 11:52:07 +0100 |
commit | aa8260adf53139d776a2affe6118d28b295c1fab (patch) | |
tree | c41e3a6bd241fa6bd8c60e864b25aedfc7ec374e /meta/lib/oe/package.py | |
parent | 9f058857fb692f1251deb43bcaa7ed0120140093 (diff) | |
download | openembedded-core-contrib-aa8260adf53139d776a2affe6118d28b295c1fab.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r-- | meta/lib/oe/package.py | 13 |
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 @@ +import stat import mmap import subprocess @@ -11,8 +12,6 @@ def runstrip(arg): # 8 - shared library # 16 - kernel module - import stat, subprocess - (file, elftype, strip) = arg newmode = None @@ -37,16 +36,11 @@ def runstrip(arg): stripcmd.append(file) bb.debug(1, "runstrip: %s" % stripcmd) - try: - output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as e: - bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output)) + output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT) if newmode: os.chmod(file, origmode) - return - # Detect .ko module by searching for "vermagic=" string def is_kernel_module(path): with open(path) as f: @@ -164,8 +158,7 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, d, qa_already_stripp elf_file = int(elffiles[file]) sfiles.append((file, elf_file, strip_cmd)) - oe.utils.multiprocess_exec(sfiles, runstrip) - + oe.utils.multiprocess_launch(runstrip, sfiles, d) def file_translate(file): |