diff mbox series

package: disable renamed dependency error if allarch is overridden

Message ID 20250509211912.3286338-1-ohnatiuk@cisco.com
State New
Headers show
Series package: disable renamed dependency error if allarch is overridden | expand

Commit Message

Oleksandr Hnatiuk May 9, 2025, 9:19 p.m. UTC
allarch code is only triggered if PACKAGE_ARCH remains set to "all".
This is not the case under some circumstances, like in the case of
nativesdk class which overrides this variable. This error then breaks
nativesdk package groups which depend on renamed packages yet aren't
affected by allarch.

Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com>
---
 meta/lib/oe/packagedata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py
index 2d1d6ddeb75e..2bc57b8c343c 100644
--- a/meta/lib/oe/packagedata.py
+++ b/meta/lib/oe/packagedata.py
@@ -138,7 +138,7 @@  def get_package_mapping(pkg, basepkg, d, depversions=None):
     key = "PKG:%s" % pkg
 
     if key in data:
-        if bb.data.inherits_class('allarch', d) and bb.data.inherits_class('packagegroup', d) and pkg != data[key]:
+        if d.getVar("PACKAGE_ARCH") == "all" and bb.data.inherits_class('packagegroup', d) and pkg != data[key]:
             bb.error("An allarch packagegroup shouldn't depend on packages which are dynamically renamed (%s to %s)" % (pkg, data[key]))
         # Have to avoid undoing the write_extra_pkgs(global_variants...)
         if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \