diff mbox series

[1/2] package: Fix source info when PACKAGE_DEBUG_STATIC_SPLIT is set

Message ID 20260810-fix-save-debugsources-info-v1-1-2e83131bcf01@bootlin.com
State New
Headers show
Series package: improve save_debugsources_info() | expand

Commit Message

Benjamin Robin Aug. 10, 2026, 7:11 a.m. UTC
Do not override the list of ELF files, with associated source info, when
PACKAGE_DEBUG_STATIC_SPLIT is set. Extend the list instead.

When PACKAGE_DEBUG_STATIC_SPLIT is not set, use a generator expression
instead of calling append for each element: Small cleanup.

Signed-off-by: Benjamin Robin <benjamin.robin@bootlin.com>
---
 meta/lib/oe/package.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index d047e41a78ec..4a244ec9801e 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -1292,10 +1292,9 @@  def process_split_and_strip_files(d):
 
         if dv["srcdir"] and not hostos.startswith("mingw"):
             if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'):
-                results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, dv, d))
+                results.extend(oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, dv, d)))
             else:
-                for file in staticlibs:
-                    results.append( (file,source_info(file, d)) )
+                results.extend((file, source_info(file, d)) for file in staticlibs)
 
         d.setVar("PKGDEBUGSOURCES", {strip_pkgd_prefix(f): sorted(s) for f, s in results})