diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-12 16:33:14 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-15 12:55:27 +0000 |
commit | 0562ab65936a11217cad570d4d633a246e20d3c6 (patch) | |
tree | 4fc3f4a4bb2f626addcea2a86093d02ed7192a27 /meta/classes | |
parent | f07a097213477c4e4291e6dbcddd04300631f294 (diff) | |
download | poky-0562ab65936a11217cad570d4d633a246e20d3c6.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]
(From OE-Core rev: 5bf3e447d2f5064495d83a8fad30229bcf1ecc9b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package.bbclass | 2 |
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): | |||
619 | key = "PKG:%s" % pkg | 619 | key = "PKG:%s" % pkg |
620 | 620 | ||
621 | if key in data: | 621 | if key in data: |
622 | if bb.data.inherits_class('allarch', d) and bb.data.inherits_class('packagegroup', d) and pkg != data[key]: | ||
623 | bb.error("An allarch packagegroup shouldn't depend on packages which are dynamically renamed (%s to %s)" % (pkg, data[key])) | ||
622 | # Have to avoid undoing the write_extra_pkgs(global_variants...) | 624 | # Have to avoid undoing the write_extra_pkgs(global_variants...) |
623 | if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \ | 625 | if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \ |
624 | and data[key] == basepkg: | 626 | and data[key] == basepkg: |