diff mbox series

[v5,1/3] package: change location of debugsources to PKGDESTWORK

Message ID 20250521134400.1733473-2-daniel.turull@ericsson.com
State New
Headers show
Series Check compiled files to filter kernel CVEs | expand

Commit Message

Daniel Turull May 21, 2025, 1:43 p.m. UTC
From: Daniel Turull <daniel.turull@ericsson.com>

Storing file generated doing packaging in WORKDIR,
doesn't get cached in sstate and task depending on them fail
to find them.

Store it instead in pkgdata/debugsources.

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
 meta/lib/oe/package.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 0bcc04ea54..6fcd001db1 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -972,7 +972,10 @@  def copydebugsources(debugsrcdir, sources, d):
     cpath = oe.cachedpath.CachedPath()
 
     if debugsrcdir and sources:
-        sourcefile = d.expand("${WORKDIR}/debugsources.list")
+        sourcefile = d.expand("${PKGDESTWORK}/debugsources/${PN}-debugsources.list")
+        debugdir = os.path.dirname(sourcefile)
+        if not os.path.isdir(debugdir):
+            bb.utils.mkdirhier(debugdir)
         bb.utils.remove(sourcefile)
 
         # filenames are null-separated - this is an artefact of the previous use