* [PATCH] packagegroup: Properly track the enabling of complementary packages
@ 2022-03-24 11:41 Alban Bedel
2022-03-24 12:15 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Alban Bedel @ 2022-03-24 11:41 UTC (permalink / raw)
To: OE-core; +Cc: Alban Bedel
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
The set of packages included in a packagegroup depend on the
PACKAGEGROUP_DISABLE_COMPLEMENTARY variable and, if that variable is
not set to '1', on DISTRO_FEATURES. As this magic happen in a python
function it can't be detected by the dependency system. We have to add
these variables to the PACKAGEVARS list to have them added to the
do_package vardeps list.
Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
---
meta/classes/packagegroup.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
index 557b1b6382ba..cffdaadbde0e 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -31,9 +31,11 @@ python () {
packages = [pkg + suffix for pkg in packages
for suffix in types]
d.setVar('PACKAGES', ' '.join(packages))
+ d.appendVar('PACKAGEVARS', ' DISTRO_FEATURES')
for pkg in packages:
d.setVar('ALLOW_EMPTY:%s' % pkg, '1')
}
+PACKAGEVARS += 'PACKAGEGROUP_DISABLE_COMPLEMENTARY'
# We don't want to look at shared library dependencies for the
# dbg packages
--
2.32.0
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3627 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [OE-core] [PATCH] packagegroup: Properly track the enabling of complementary packages
2022-03-24 11:41 [PATCH] packagegroup: Properly track the enabling of complementary packages Alban Bedel
@ 2022-03-24 12:15 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2022-03-24 12:15 UTC (permalink / raw)
To: alban.bedel, OE-core
On Thu, 2022-03-24 at 12:41 +0100, Alban Bedel via lists.openembedded.org wrote:
> The set of packages included in a packagegroup depend on the
> PACKAGEGROUP_DISABLE_COMPLEMENTARY variable and, if that variable is
> not set to '1', on DISTRO_FEATURES. As this magic happen in a python
> function it can't be detected by the dependency system. We have to add
> these variables to the PACKAGEVARS list to have them added to the
> do_package vardeps list.
>
> Signed-off-by: Alban Bedel <alban.bedel@aerq.com>
> ---
> meta/classes/packagegroup.bbclass | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
> index 557b1b6382ba..cffdaadbde0e 100644
> --- a/meta/classes/packagegroup.bbclass
> +++ b/meta/classes/packagegroup.bbclass
> @@ -31,9 +31,11 @@ python () {
> packages = [pkg + suffix for pkg in packages
> for suffix in types]
> d.setVar('PACKAGES', ' '.join(packages))
> + d.appendVar('PACKAGEVARS', ' DISTRO_FEATURES')
> for pkg in packages:
> d.setVar('ALLOW_EMPTY:%s' % pkg, '1')
> }
> +PACKAGEVARS += 'PACKAGEGROUP_DISABLE_COMPLEMENTARY'
>
That is a hugely heavy hammer to apply to the problem. We go to quite some
lengths to try and ensure changing DISTRO_FEATURES doesn't cause things to
rebuild unless they need to (e.g. by using contains()).
PACKAGEVARS is also the wrong thing for use here as it is for variables which
have per package versions (like ALLOW_EMPTY). Put another way,
PACKAGEGROUP_DISABLE_COMPLEMENTARY:${PN}-dbg makes no sense.
PACKAGES[vardeps] += "PACKAGEGROUP_DISABLE_COMPLEMENTARY"
would be the correct way to handle the first part of this. For the distro
features piece, something like this:
PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '', '', d)}"
might cause the dependencies to work correctly.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-24 12:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-24 11:41 [PATCH] packagegroup: Properly track the enabling of complementary packages Alban Bedel
2022-03-24 12:15 ` [OE-core] " Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox