* Wacky dependencies
@ 2012-11-16 14:12 Gary Thomas
2012-11-16 14:24 ` Paul Eggleton
0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2012-11-16 14:12 UTC (permalink / raw)
To: Poky Project
I wanted to run an experiment with X11 vs GTK-directfb on my platform.
I built a complete image with X11 in DISTRO_FEATURES.
When I changed DISTRO_FEATURES to have gtk-directfb, nearly everything
was rebuilt! Why on earth do GCC & EGLIBC have to be rebuilt?? This
doesn't seem logical at all to me.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 14:12 Wacky dependencies Gary Thomas
@ 2012-11-16 14:24 ` Paul Eggleton
2012-11-16 14:29 ` Gary Thomas
2012-11-16 18:14 ` Andy Ross
0 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2012-11-16 14:24 UTC (permalink / raw)
To: Gary Thomas; +Cc: poky
On Friday 16 November 2012 07:12:38 Gary Thomas wrote:
> I wanted to run an experiment with X11 vs GTK-directfb on my platform.
> I built a complete image with X11 in DISTRO_FEATURES.
> When I changed DISTRO_FEATURES to have gtk-directfb, nearly everything
> was rebuilt! Why on earth do GCC & EGLIBC have to be rebuilt?? This
> doesn't seem logical at all to me.
The build system is not able to determine whether a variable within a recipe
depends on a single value within DISTRO_FEATURES, it only knows that it looks
at the variable; thus any change to DISTRO_FEATURES will change the hash of
all recipes that read DISTRO_FEATURES.
I'd like to fix this but given that we check if DISTRO_FEATURES and other list
variables like it contain values using inline python code i.e.
${@base_contains(...)} this seems like it would be tricky to implement in a
reliable way.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 14:24 ` Paul Eggleton
@ 2012-11-16 14:29 ` Gary Thomas
2012-11-16 15:06 ` Tomas Frydrych
2012-11-16 15:32 ` Chris Larson
2012-11-16 18:14 ` Andy Ross
1 sibling, 2 replies; 7+ messages in thread
From: Gary Thomas @ 2012-11-16 14:29 UTC (permalink / raw)
To: Paul Eggleton; +Cc: poky
On 2012-11-16 07:24, Paul Eggleton wrote:
> On Friday 16 November 2012 07:12:38 Gary Thomas wrote:
>> I wanted to run an experiment with X11 vs GTK-directfb on my platform.
>> I built a complete image with X11 in DISTRO_FEATURES.
>> When I changed DISTRO_FEATURES to have gtk-directfb, nearly everything
>> was rebuilt! Why on earth do GCC & EGLIBC have to be rebuilt?? This
>> doesn't seem logical at all to me.
>
> The build system is not able to determine whether a variable within a recipe
> depends on a single value within DISTRO_FEATURES, it only knows that it looks
> at the variable; thus any change to DISTRO_FEATURES will change the hash of
> all recipes that read DISTRO_FEATURES.
>
> I'd like to fix this but given that we check if DISTRO_FEATURES and other list
> variables like it contain values using inline python code i.e.
> ${@base_contains(...)} this seems like it would be tricky to implement in a
> reliable way.
In this particular case, I think the problem is that DISTRO_FEATURES contains
too many controls. In particular, all of the LIBC settings which *are* important
to GCC & EGLIBC. Maybe that part should be kept separate and only have DISTRO_FEATURES
contain non-compiler items?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 14:29 ` Gary Thomas
@ 2012-11-16 15:06 ` Tomas Frydrych
2012-11-16 15:32 ` Chris Larson
1 sibling, 0 replies; 7+ messages in thread
From: Tomas Frydrych @ 2012-11-16 15:06 UTC (permalink / raw)
To: poky
On 16/11/12 14:29, Gary Thomas wrote:
> In this particular case, I think the problem is that DISTRO_FEATURES
> contains too many controls. In particular, all of the LIBC settings
> which *are* important to GCC & EGLIBC. Maybe that part should be
> kept separate and only have DISTRO_FEATURES contain non-compiler
> items?
Changing distro features is not something you do on daily basis, but
when you do, the breakage potential is significant, so this really needs
to be robust more than efficient. If the check can be made smarter the
way Paul suggested, that would have some benefit, but multiplying the
variables that make up distro config will make maintaining distros, and
packages that depend on distro features, harder and more error prone, I
think.
Tomas
--
http://sleepfive.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 14:29 ` Gary Thomas
2012-11-16 15:06 ` Tomas Frydrych
@ 2012-11-16 15:32 ` Chris Larson
1 sibling, 0 replies; 7+ messages in thread
From: Chris Larson @ 2012-11-16 15:32 UTC (permalink / raw)
To: Gary Thomas; +Cc: Paul Eggleton, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
On Fri, Nov 16, 2012 at 7:29 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> I'd like to fix this but given that we check if DISTRO_FEATURES and other
>> list
>> variables like it contain values using inline python code i.e.
>> ${@base_contains(...)} this seems like it would be tricky to implement in
>> a
>> reliable way.
>
>
I think you'd probably have to add the appropriate vardepsexclude on a
case-by-case basis, unless you wanted to play with the ast module and try
to determine what's being passed to base_contains :)
--
Christopher Larson
[-- Attachment #2: Type: text/html, Size: 955 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 14:24 ` Paul Eggleton
2012-11-16 14:29 ` Gary Thomas
@ 2012-11-16 18:14 ` Andy Ross
2012-11-16 19:36 ` Gary Thomas
1 sibling, 1 reply; 7+ messages in thread
From: Andy Ross @ 2012-11-16 18:14 UTC (permalink / raw)
To: Paul Eggleton; +Cc: poky
On 11/16/2012 06:24 AM, Paul Eggleton wrote:
> The build system is not able to determine whether a variable within a recipe
> depends on a single value within DISTRO_FEATURES, it only knows that it looks
> at the variable; thus any change to DISTRO_FEATURES will change the hash of
> all recipes that read DISTRO_FEATURES.
>
> I'd like to fix this but given that we check if DISTRO_FEATURES and other list
> variables like it contain values using inline python code i.e.
> ${@base_contains(...)} this seems like it would be tricky to implement in a
> reliable way.
I've been playing with variable dependency tracking recently and saw
issues like this too. I don't think it can be done compatibly (in the
sense of preserving the existing list-in-a-string representation) at
all. The problem is that dependencies are only tracked at the
variable level and the "logical dependency" is on substructure in the
data that isn't visible to the dependency system.
You could do this with the existing data model though, but splitting
things out into distinct variables. Test for the presence of
"DISTRO_FEATURES_directfb" for example. Or use flags:
"DISTRO_FEATURES[directfb]". Flags would require bitbake modification
though, because they aren't part of the taskdeps field in the
siguatures.
DISTRO_FEATURES is interpreted outside bitbake, of course. But in a
more limited sense this could be done for OVERRIDES, as it's handled
internally and could be special-cased in the dependency handling.
Andy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wacky dependencies
2012-11-16 18:14 ` Andy Ross
@ 2012-11-16 19:36 ` Gary Thomas
0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2012-11-16 19:36 UTC (permalink / raw)
To: Andy Ross; +Cc: Paul Eggleton, poky
On 2012-11-16 11:14, Andy Ross wrote:
> On 11/16/2012 06:24 AM, Paul Eggleton wrote:
>> The build system is not able to determine whether a variable within a recipe
>> depends on a single value within DISTRO_FEATURES, it only knows that it looks
>> at the variable; thus any change to DISTRO_FEATURES will change the hash of
>> all recipes that read DISTRO_FEATURES.
>>
>> I'd like to fix this but given that we check if DISTRO_FEATURES and other list
>> variables like it contain values using inline python code i.e.
>> ${@base_contains(...)} this seems like it would be tricky to implement in a
>> reliable way.
>
> I've been playing with variable dependency tracking recently and saw
> issues like this too. I don't think it can be done compatibly (in the
> sense of preserving the existing list-in-a-string representation) at
> all. The problem is that dependencies are only tracked at the
> variable level and the "logical dependency" is on substructure in the
> data that isn't visible to the dependency system.
>
> You could do this with the existing data model though, but splitting
> things out into distinct variables. Test for the presence of
> "DISTRO_FEATURES_directfb" for example. Or use flags:
> "DISTRO_FEATURES[directfb]". Flags would require bitbake modification
> though, because they aren't part of the taskdeps field in the
> siguatures.
>
> DISTRO_FEATURES is interpreted outside bitbake, of course. But in a
> more limited sense this could be done for OVERRIDES, as it's handled
> internally and could be special-cased in the dependency handling.
Thanks, I can see that this is a truly "sticky widget".
Sadly, it probably doesn't matter as gtk-directfb isn't really ready
for prime time (it does not play nice with my touch screen device),
so I'll be switching back to X11 and fighting my battles there.
... off to rebuild the world [again]
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-16 19:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 14:12 Wacky dependencies Gary Thomas
2012-11-16 14:24 ` Paul Eggleton
2012-11-16 14:29 ` Gary Thomas
2012-11-16 15:06 ` Tomas Frydrych
2012-11-16 15:32 ` Chris Larson
2012-11-16 18:14 ` Andy Ross
2012-11-16 19:36 ` Gary Thomas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.