summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-12 16:33:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-15 12:53:35 +0000
commit5bf3e447d2f5064495d83a8fad30229bcf1ecc9b (patch)
tree5e74c0308da2251a8145017997f413606276aa29 /meta/classes
parent61fb93ff9b6129f6bd11a4535080529cc2a643df (diff)
downloadopenembedded-core-contrib-5bf3e447d2f5064495d83a8fad30229bcf1ecc9b.tar.gz
package: Add sanity check for allarch packagegroups
We exclude allarch packagegroups from rebuilding when their dependencies change. The reasoning is that we are just depending on a name so having these rebuild lots is just pointless and inefficient. We also don't want them duplicated for multiple machines for efficiency. In general this works fine, as long as the package names don't change. That is also rare but there is one corner case which does catch users out - debian package renaming. When this does break, users question sstate and so on and lose faith in the system even if this is a known choice we made. This commit adds an error message if an allarch packagegroup depends on any package which shows package renaming in action (through the PKG variable being set). If you run into this issue you either need to remove the dependency from the packagegroup or mark the packagegroup as tune specific, i.e. set: PACKAGE_ARCH = "${TUNE_PKGARCH}" before the packagegroup inherit. [YOCTO #7298] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 92eba98892..84eafbd529 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -619,6 +619,8 @@ 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]:
+ 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') \
and data[key] == basepkg: