Skip to contentSkip to conversation

classes-global/package: Ensure -src package is handled in signatures

PATCH New Joshua Watt 1 participant 1 message Apr 9

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes-global/package: Ensure -src package is handled in signatures

populate_packages() will automatically insert a -src package if PACKAGE_DEBUG_SPLIT_STYLE is "debug-with-srcpkg", even if there is not -src package in PACKAGES. However, when the -src package is not in PACKAGES, it is not accounted for in the task signatures which results in errors.

[YOCTO #16238]

---
 meta/classes-global/package.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)
meta/classes-global/package.bbclass +6 -0
index bd32a6ede5..e50a2e586e 100644
@@ -443,6 +443,12 @@ PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDE
 def gen_packagevar(d, pkgvars="PACKAGEVARS"):
     ret = []
     pkgs = (d.getVar("PACKAGES") or "").split()
+    # populate_packages will add a -src package if debug-with-srcpkg which must
+    # be replicated here
+    if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg':
+        src_pkg = "%s-src" % d.getVar("PN")
+        if src_pkg not in pkgs:
+            pkgs.append(src_pkg)
     vars = (d.getVar(pkgvars) or "").split()
     for v in vars:
         ret.append(v)
Signature · 1 line
2.53.0