summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-27 13:39:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-02-28 07:49:18 +0000
commit430ed4a884f900b5b6a38fd504dd6e8d0857af76 (patch)
tree3f022d4e0897876cdfd340c5c2998dd4f01973d4 /meta/lib
parentc92709d4c0d83903695517798db71493bacc25df (diff)
downloadpoky-430ed4a884f900b5b6a38fd504dd6e8d0857af76.tar.gz
lib/package/utils: Improve multiprocess_launch argument passing
The current code for multiple argument passing is horrible. Tweak the multiprocess_launch function to only convert to a tuple if it isn't already one, which means we can then use function arguments in a standard way. (From OE-Core rev: 7c99f90079e722764ebdc30e8d0e781454b3a51a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package.py11
-rw-r--r--meta/lib/oe/utils.py4
2 files changed, 5 insertions, 10 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 1af10b7eb0..0db14f2164 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,7 +18,7 @@ import shutil
18 18
19import oe.cachedpath 19import oe.cachedpath
20 20
21def runstrip(arg): 21def runstrip(file, elftype, strip, extra_strip_sections=''):
22 # Function to strip a single file, called from split_and_strip_files below 22 # Function to strip a single file, called from split_and_strip_files below
23 # A working 'file' (one which works on the target architecture) 23 # A working 'file' (one which works on the target architecture)
24 # 24 #
@@ -28,12 +28,6 @@ def runstrip(arg):
28 # 8 - shared library 28 # 8 - shared library
29 # 16 - kernel module 29 # 16 - kernel module
30 30
31 if len(arg) == 3:
32 (file, elftype, strip) = arg
33 extra_strip_sections = ''
34 else:
35 (file, elftype, strip, extra_strip_sections) = arg
36
37 newmode = None 31 newmode = None
38 if not os.access(file, os.W_OK) or os.access(file, os.R_OK): 32 if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
39 origmode = os.stat(file)[stat.ST_MODE] 33 origmode = os.stat(file)[stat.ST_MODE]
@@ -220,10 +214,9 @@ def file_reverse_translate(file):
220 214
221 return ft 215 return ft
222 216
223def filedeprunner(arg): 217def filedeprunner(pkg, pkgfiles, rpmdeps, pkgdest):
224 import re, subprocess, shlex 218 import re, subprocess, shlex
225 219
226 (pkg, pkgfiles, rpmdeps, pkgdest) = arg
227 provides = {} 220 provides = {}
228 requires = {} 221 requires = {}
229 222
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index c9c7a47041..d272dd2b8d 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -316,7 +316,9 @@ def multiprocess_launch_mp(target, items, max_process, extraargs=None):
316 items = list(items) 316 items = list(items)
317 while (items and not errors) or launched: 317 while (items and not errors) or launched:
318 if not errors and items and len(launched) < max_process: 318 if not errors and items and len(launched) < max_process:
319 args = (items.pop(),) 319 args = items.pop()
320 if not type(args) is tuple:
321 args = (args,)
320 if extraargs is not None: 322 if extraargs is not None:
321 args = args + extraargs 323 args = args + extraargs
322 p = ProcessLaunch(target=target, args=args) 324 p = ProcessLaunch(target=target, args=args)