diff options
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 @@ | |||
1 | import stat | ||
1 | import mmap | 2 | import mmap |
2 | import subprocess | 3 | import 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 |
51 | def is_kernel_module(path): | 45 | def 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 | ||
171 | def file_translate(file): | 164 | def file_translate(file): |