Patchwork [3/4] distcc: make distccmon-gnome optional and default to off

login
register
mail settings
Submitter Paul Eggleton
Date Nov. 14, 2011, 6:54 p.m.
Message ID <2ffb85152b2b9356efeb008891d8ed29f1f35cef.1321296476.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/14953/
State New
Headers show

Comments

Paul Eggleton - Nov. 14, 2011, 6:54 p.m.
Most people building distcc will not need the distccmon-gnome GUI to be
built, so make it optional via the new PACKAGECONFIG functionality and
default it to disabled. (This also removes the need to disable it for
uclibc.)

Part of the fix for [YOCTO #1690].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-devtools/distcc/distcc_2.18.3.bb |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
Koen Kooi - Nov. 14, 2011, 7:17 p.m.
Op 14 nov. 2011, om 19:54 heeft Paul Eggleton het volgende geschreven:

> Most people building distcc will not need the distccmon-gnome GUI to be
> built, so make it optional via the new PACKAGECONFIG functionality and
> default it to disabled. (This also removes the need to disable it for
> uclibc.)
> 
> Part of the fix for [YOCTO #1690].

I think splitting distccmon-gnome into a seperate recipe is a better idea.

regards,

Koen
Richard Purdie - Nov. 14, 2011, 8:39 p.m.
On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
> Op 14 nov. 2011, om 19:54 heeft Paul Eggleton het volgende geschreven:
> 
> > Most people building distcc will not need the distccmon-gnome GUI to be
> > built, so make it optional via the new PACKAGECONFIG functionality and
> > default it to disabled. (This also removes the need to disable it for
> > uclibc.)
> > 
> > Part of the fix for [YOCTO #1690].
> 
> I think splitting distccmon-gnome into a seperate recipe is a better idea.

I think that makes sense in some cases but I'd hate for it to become the
default approach for issues like this as the duplication of code,
parsing and build time etc. grate on me. Do we really need separate
recipes?

I'll probably take this patch as it improves the situation IMO (and is
easy to change the configuration from a distro config if anyone does
have an issue with it being disabled).

Cheers,

Richard
Koen Kooi - Nov. 14, 2011, 8:55 p.m.
Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:

> On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
>> Op 14 nov. 2011, om 19:54 heeft Paul Eggleton het volgende geschreven:
>> 
>>> Most people building distcc will not need the distccmon-gnome GUI to be
>>> built, so make it optional via the new PACKAGECONFIG functionality and
>>> default it to disabled. (This also removes the need to disable it for
>>> uclibc.)
>>> 
>>> Part of the fix for [YOCTO #1690].
>> 
>> I think splitting distccmon-gnome into a seperate recipe is a better idea.
> 
> I think that makes sense in some cases but I'd hate for it to become the
> default approach for issues like this as the duplication of code,
> parsing and build time etc. grate on me. Do we really need separate
> recipes?

I think for this case, yes. And I'll happily trade needing extra buildtime for not needing USEFLAGS.

> 
> I'll probably take this patch as it improves the situation IMO (and is
> easy to change the configuration from a distro config if anyone does
> have an issue with it being disabled).

This patch changes the default behaviour in a way that distros need to update their configs in order to keep the status quo. I know I use distccmon-gnome on my boards, but will I remember 2 months from now that this patch went in? I asked this before in a different context, but I'll ask again: do you expect distro maintainers to vet each and every commit that goes into OE-core to find out when default got (silently) changed?

USEFLAGS should be a last resort when having seperate recipes doesn't work out, not a default cure. 

regards,

Koen
Richard Purdie - Nov. 14, 2011, 9:48 p.m.
On Mon, 2011-11-14 at 21:55 +0100, Koen Kooi wrote:
> Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:
> > On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
> >> I think splitting distccmon-gnome into a seperate recipe is a better idea.
> > 
> > I think that makes sense in some cases but I'd hate for it to become the
> > default approach for issues like this as the duplication of code,
> > parsing and build time etc. grate on me. Do we really need separate
> > recipes?
> 
> I think for this case, yes. And I'll happily trade needing extra
> buildtime for not needing USEFLAGS.
> 
The proposals for alternative recipes for the different combinations got
voted down and PACKAGECONFIG was the preferred solution. I can't say I
personally like everything about the outcome. I do however understand
why we've ended up in that position and don't intend to undermine the
usefulness of it.

> > I'll probably take this patch as it improves the situation IMO (and
> is
> > easy to change the configuration from a distro config if anyone does
> > have an issue with it being disabled).
> 
> This patch changes the default behaviour in a way that distros need to
> update their configs in order to keep the status quo. I know I use
> distccmon-gnome on my boards, but will I remember 2 months from now
> that this patch went in? I asked this before in a different context,
> but I'll ask again: do you expect distro maintainers to vet each and
> every commit that goes into OE-core to find out when default got
> (silently) changed?
> 
> USEFLAGS should be a last resort when having seperate recipes doesn't
> work out, not a default cure. 

The discussion and decision went against this, rightly or wrongly
PACKAGECONFIG is here and we should start to use it. In some cases it
will help you a lot, in others it will cause you a bit more work. Such
is life.

However I do agree the defaults should be backwards compatible so I'm
going to ask Paul to resubmit with a default value that matches the
original recipe, probably something like:

PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
                   ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}

although we could/should probably have some kind of "HAVEGTK" macro type
variable defined to help avoid some of this ugliness.

Cheers,

Richard
Paul Eggleton - Nov. 14, 2011, 9:56 p.m.
On Monday 14 November 2011 21:55:28 Koen Kooi wrote:
> This patch changes the default behaviour in a way that distros need to
> update their configs in order to keep the status quo. I know I use
> distccmon-gnome on my boards, 

I have to say I'm surprised, I hadn't considered the distcc UI to be 
particularly useful in our context so I'm surprised that anyone is actually 
using it, but everyone has their own requirements I guess.

> but will I remember 2 months from now that
> this patch went in? I asked this before in a different context, but I'll
> ask again: do you expect distro maintainers to vet each and every commit
> that goes into OE-core to find out when default got (silently) changed?

There are degrees of "silently". Given that this patch is being reviewed on 
the mailing list I think it's anything but silent.

Cheers,
Paul
Koen Kooi - Nov. 15, 2011, 7:58 a.m.
Op 14 nov. 2011, om 22:48 heeft Richard Purdie het volgende geschreven:

> On Mon, 2011-11-14 at 21:55 +0100, Koen Kooi wrote:
>> Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:
>>> On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
>>>> I think splitting distccmon-gnome into a seperate recipe is a better idea.
>>> 
>>> I think that makes sense in some cases but I'd hate for it to become the
>>> default approach for issues like this as the duplication of code,
>>> parsing and build time etc. grate on me. Do we really need separate
>>> recipes?
>> 
>> I think for this case, yes. And I'll happily trade needing extra
>> buildtime for not needing USEFLAGS.
>> 
> The proposals for alternative recipes for the different combinations got
> voted down and PACKAGECONFIG was the preferred solution. I can't say I
> personally like everything about the outcome. I do however understand
> why we've ended up in that position and don't intend to undermine the
> usefulness of it.
> 
>>> I'll probably take this patch as it improves the situation IMO (and
>> is
>>> easy to change the configuration from a distro config if anyone does
>>> have an issue with it being disabled).
>> 
>> This patch changes the default behaviour in a way that distros need to
>> update their configs in order to keep the status quo. I know I use
>> distccmon-gnome on my boards, but will I remember 2 months from now
>> that this patch went in? I asked this before in a different context,
>> but I'll ask again: do you expect distro maintainers to vet each and
>> every commit that goes into OE-core to find out when default got
>> (silently) changed?
>> 
>> USEFLAGS should be a last resort when having seperate recipes doesn't
>> work out, not a default cure. 
> 
> The discussion and decision went against this, rightly or wrongly
> PACKAGECONFIG is here and we should start to use it. In some cases it
> will help you a lot, in others it will cause you a bit more work. Such
> is life.

Let's move this to the TSC and see if we can get this crap removed. There is already an existing ruling that USEFLAGS should be a last resort. I'm tired of yocto-marketing feel good patches making life harder for people actually using oe-core and its output.
Paul Menzel - Nov. 15, 2011, 8:47 a.m.
Am Montag, den 14.11.2011, 21:48 +0000 schrieb Richard Purdie:
> On Mon, 2011-11-14 at 21:55 +0100, Koen Kooi wrote:
> > Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:
> > > On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
> > >> I think splitting distccmon-gnome into a seperate recipe is a better idea.
> > > 
> > > I think that makes sense in some cases but I'd hate for it to become the
> > > default approach for issues like this as the duplication of code,
> > > parsing and build time etc. grate on me. Do we really need separate
> > > recipes?
> > 
> > I think for this case, yes. And I'll happily trade needing extra
> > buildtime for not needing USEFLAGS.
> > 
> The proposals for alternative recipes for the different combinations got
> voted down and PACKAGECONFIG was the preferred solution.

Where is this vote (and discussion) documented? I found nothing in the
OE Wiki and searching for it with »openembedded packageconfig vote
oe-core list« brought up only some minutes [1].

I also do not remember anything on openembedded-devel where such general
discussion definitely belong in my opinion.

It would be great if somebody could help me by giving me an URL.

> I can't say I personally like everything about the outcome. I do
> however understand why we've ended up in that position and don't
> intend to undermine the usefulness of it.

[…]


Thanks,

Paul


[1] http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/7688
Richard Purdie - Nov. 15, 2011, 10:15 a.m.
On Tue, 2011-11-15 at 08:58 +0100, Koen Kooi wrote:
> Op 14 nov. 2011, om 22:48 heeft Richard Purdie het volgende geschreven:
> 
> > On Mon, 2011-11-14 at 21:55 +0100, Koen Kooi wrote:
> >> Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:
> >>> On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
> >>>> I think splitting distccmon-gnome into a seperate recipe is a better idea.
> >>> 
> >>> I think that makes sense in some cases but I'd hate for it to become the
> >>> default approach for issues like this as the duplication of code,
> >>> parsing and build time etc. grate on me. Do we really need separate
> >>> recipes?
> >> 
> >> I think for this case, yes. And I'll happily trade needing extra
> >> buildtime for not needing USEFLAGS.
> >> 
> > The proposals for alternative recipes for the different combinations got
> > voted down and PACKAGECONFIG was the preferred solution. I can't say I
> > personally like everything about the outcome. I do however understand
> > why we've ended up in that position and don't intend to undermine the
> > usefulness of it.
> > 
> >>> I'll probably take this patch as it improves the situation IMO (and
> >> is
> >>> easy to change the configuration from a distro config if anyone does
> >>> have an issue with it being disabled).
> >> 
> >> This patch changes the default behaviour in a way that distros need to
> >> update their configs in order to keep the status quo. I know I use
> >> distccmon-gnome on my boards, but will I remember 2 months from now
> >> that this patch went in? I asked this before in a different context,
> >> but I'll ask again: do you expect distro maintainers to vet each and
> >> every commit that goes into OE-core to find out when default got
> >> (silently) changed?
> >> 
> >> USEFLAGS should be a last resort when having seperate recipes doesn't
> >> work out, not a default cure. 
> > 
> > The discussion and decision went against this, rightly or wrongly
> > PACKAGECONFIG is here and we should start to use it. In some cases it
> > will help you a lot, in others it will cause you a bit more work. Such
> > is life.
> 
> Let's move this to the TSC and see if we can get this crap removed.

Lets revisit the original problem - how can a user disable something
like X11 from being built when they don't need/want/care about it? We
have the layers mechanism but I don't think its reasonable for them to
have to bbappend everything with an optional X dependency which was the
only option previously available.

I can't say I love the PACKAGECONFIG code but equally I'm not aware of
any better proposal for solving a real world issue a significant portion
of the userbase has in some form (be it X11, gstreamer plugins or other
areas).

>  There is already an existing ruling that USEFLAGS should be a last
> resort. 

There was a discussion about *not* calling these USEFLAGS...

> I'm tired of yocto-marketing feel good patches making life harder for
> people actually using oe-core and its output.

I can think of several actual users who find PACKAGECONFIG makes their
life much easier. I'd guess they're not "proper" users though?

You keep talking about "them" and "us" and I'm really getting sick of
it. The whole point is we work as one team on OE-Core. This also means
we also take collective responsibility for actions ("disagree and
commit"). There are a ton of hoops I jump through when trying to
maintain OE-Core to ensure its not just me but everyone gets time for
review, discussion etc. of patches and that there is a decision making
process which involved others for major decisions (the TSC).

Decisions around PACKAGECONFIG were nothing to do with Yocto, Yocto
didn't ask for it. Since OE-Core committed to that direction, yes, Yocto
people have written some patches using it. Yocto did ensure during the
discussion about that feature it could solve some problems Yocto was
aware of.

Its ironic I'm now in the position I'm defending something I was never
keen on (but I do understand why on balance we probably do need it).

Cheers,

Richard
Richard Purdie - Nov. 15, 2011, 10:51 a.m.
On Tue, 2011-11-15 at 09:47 +0100, Paul Menzel wrote:
> Am Montag, den 14.11.2011, 21:48 +0000 schrieb Richard Purdie:
> > On Mon, 2011-11-14 at 21:55 +0100, Koen Kooi wrote:
> > > Op 14 nov. 2011, om 21:39 heeft Richard Purdie het volgende geschreven:
> > > > On Mon, 2011-11-14 at 20:17 +0100, Koen Kooi wrote:
> > > >> I think splitting distccmon-gnome into a seperate recipe is a better idea.
> > > > 
> > > > I think that makes sense in some cases but I'd hate for it to become the
> > > > default approach for issues like this as the duplication of code,
> > > > parsing and build time etc. grate on me. Do we really need separate
> > > > recipes?
> > > 
> > > I think for this case, yes. And I'll happily trade needing extra
> > > buildtime for not needing USEFLAGS.
> > > 
> > The proposals for alternative recipes for the different combinations got
> > voted down and PACKAGECONFIG was the preferred solution.
> 
> Where is this vote (and discussion) documented? I found nothing in the
> OE Wiki and searching for it with »openembedded packageconfig vote
> oe-core list« brought up only some minutes [1].
> 
> I also do not remember anything on openembedded-devel where such general
> discussion definitely belong in my opinion.
> 
> It would be great if somebody could help me by giving me an URL.

The reference I could find was:

http://lists.linuxtogo.org/pipermail/tsc/2011-October/000302.html

which asked for objections amongst the TSC members, non were received.
I'm drawing a blank finding the previous discussion, I think there was a
different term used and I can't think what it was which makes searching
hard. There was also discussion of the actual patches on the mailing
list (which IMO is where the discussion should really happen).

Cheers,

Richard
Paul Eggleton - Nov. 15, 2011, 11:44 a.m.
On Tuesday 15 November 2011 08:58:00 Koen Kooi wrote:
> Let's move this to the TSC and see if we can get this crap removed. There is
> already an existing ruling that USEFLAGS should be a last resort. I'm tired
> of yocto-marketing feel good patches making life harder for people actually
> using oe-core and its output.

Marketing has nothing to do with it. All I really want is to fix the problem 
that the build blows up if you try to build any image for any of the qemu* 
machines with x11 removed from DISTRO_FEATURES. I think it would have been 
nice to also be able to avoid having to build gtk+ and everything it depends 
upon for all such images regardless of whether or not it is really needed, but 
I can live without making that further cleanup if it's going to cause such an 
uproar.

If PACKAGE_CONFIG is not an acceptable solution to this problem I'll accept 
checking for x11 in DISTRO_FEATURES alone, if that's what it takes to get the 
real problem fixed.

Cheers,
Paul
Koen Kooi - Nov. 15, 2011, 12:15 p.m.
Op 15 nov. 2011, om 12:44 heeft Paul Eggleton het volgende geschreven:

> On Tuesday 15 November 2011 08:58:00 Koen Kooi wrote:
>> Let's move this to the TSC and see if we can get this crap removed. There is
>> already an existing ruling that USEFLAGS should be a last resort. I'm tired
>> of yocto-marketing feel good patches making life harder for people actually
>> using oe-core and its output.
> 
> Marketing has nothing to do with it. All I really want is to fix the problem 
> that the build blows up if you try to build any image for any of the qemu* 
> machines with x11 removed from DISTRO_FEATURES.

Isn't a better question "Why are all images for qemu machines forcing distcc to get built?"?

> I think it would have been 
> nice to also be able to avoid having to build gtk+ and everything it depends 
> upon for all such images regardless of whether or not it is really needed, but 
> I can live without making that further cleanup if it's going to cause such an 
> uproar.
> 
> If PACKAGE_CONFIG is not an acceptable solution to this problem I'll accept 
> checking for x11 in DISTRO_FEATURES alone, if that's what it takes to get the 
> real problem fixed.

Or just make a seperate recipe for distccmon-gnome, that would avoid the need of any USEFLAGS. Should be just a matter of require distcc_$PV.bb ; EXTRA_OEOCONF = foo

regards,

Koen
Richard Purdie - Nov. 15, 2011, 1:43 p.m.
On Tue, 2011-11-15 at 13:15 +0100, Koen Kooi wrote:
> Op 15 nov. 2011, om 12:44 heeft Paul Eggleton het volgende geschreven:
> 
> > On Tuesday 15 November 2011 08:58:00 Koen Kooi wrote:
> >> Let's move this to the TSC and see if we can get this crap removed. There is
> >> already an existing ruling that USEFLAGS should be a last resort. I'm tired
> >> of yocto-marketing feel good patches making life harder for people actually
> >> using oe-core and its output.
> > 
> > Marketing has nothing to do with it. All I really want is to fix the problem 
> > that the build blows up if you try to build any image for any of the qemu* 
> > machines with x11 removed from DISTRO_FEATURES.
> 
> Isn't a better question "Why are all images for qemu machines forcing distcc to get built?"?

Both questions are valid:

a) If I build distcc and I have x11 disabled, it shouldn't break.

b) Should qemu include distcc?

Traditionally, qemu-config does pull it in. Why? The qemu scripts allow
pass through of compilation to the build system instead of doing it
under emulation for a significant speed up in compile time. It was
originally felt that it should therefore maximally autoconfigure that
stuff transparently to the user.

If we don't think that is useful we can drop it. That is a separate
discussion to a) which seems to be the contentious problem and solving
b) is just hiding from the issue.

> Or just make a seperate recipe for distccmon-gnome, that would avoid
> the need of any USEFLAGS. Should be just a matter of require distcc_
> $PV.bb ; EXTRA_OEOCONF = foo

and the rest (resolving the various packaging conflicts so that
distcc-gnome only packages the gnome pieces and removes everything
else).

To put this quite simply, I think there is no good reason we shouldn't
use the mechanism we've selected to handle this kind of problem. We
should have defaults the reflect backwards compatibility. Other than
that where is the problem other than a general objection to
PACKAGECONFIG?

Cheers,

Richard
Koen Kooi - Nov. 15, 2011, 1:59 p.m.
Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:

> On Tue, 2011-11-15 at 13:15 +0100, Koen Kooi wrote:
>> Op 15 nov. 2011, om 12:44 heeft Paul Eggleton het volgende geschreven:
>> 
>>> On Tuesday 15 November 2011 08:58:00 Koen Kooi wrote:
>>>> Let's move this to the TSC and see if we can get this crap removed. There is
>>>> already an existing ruling that USEFLAGS should be a last resort. I'm tired
>>>> of yocto-marketing feel good patches making life harder for people actually
>>>> using oe-core and its output.
>>> 
>>> Marketing has nothing to do with it. All I really want is to fix the problem 
>>> that the build blows up if you try to build any image for any of the qemu* 
>>> machines with x11 removed from DISTRO_FEATURES.
>> 
>> Isn't a better question "Why are all images for qemu machines forcing distcc to get built?"?
> 
> Both questions are valid:
> 
> a) If I build distcc and I have x11 disabled, it shouldn't break.
> 
> b) Should qemu include distcc?
> 
> Traditionally, qemu-config does pull it in. Why? The qemu scripts allow
> pass through of compilation to the build system instead of doing it
> under emulation for a significant speed up in compile time. It was
> originally felt that it should therefore maximally autoconfigure that
> stuff transparently to the user.
> 
> If we don't think that is useful we can drop it. That is a separate
> discussion to a) which seems to be the contentious problem and solving
> b) is just hiding from the issue.
> 
>> Or just make a seperate recipe for distccmon-gnome, that would avoid
>> the need of any USEFLAGS. Should be just a matter of require distcc_
>> $PV.bb ; EXTRA_OEOCONF = foo
> 
> and the rest (resolving the various packaging conflicts so that
> distcc-gnome only packages the gnome pieces and removes everything
> else).
> 
> To put this quite simply, I think there is no good reason we shouldn't
> use the mechanism we've selected to handle this kind of problem. We
> should have defaults the reflect backwards compatibility. Other than
> that where is the problem other than a general objection to
> PACKAGECONFIG?

It forces a choice when there is a solution where things can coexist.

regards,

Koen
Richard Purdie - Nov. 15, 2011, 2:42 p.m.
On Tue, 2011-11-15 at 14:59 +0100, Koen Kooi wrote:
> Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:
> > To put this quite simply, I think there is no good reason we shouldn't
> > use the mechanism we've selected to handle this kind of problem. We
> > should have defaults the reflect backwards compatibility. Other than
> > that where is the problem other than a general objection to
> > PACKAGECONFIG?
> 
> It forces a choice when there is a solution where things can coexist.

There are multiple ways of coexisting and the configuration changing
based on DISTRO_FEATURES doesn't force a choice either.

Bottom line is we discussed and agreed a way of handling this and I'd
really like to have one preferred way of doing so. IMO the two recipe
approach duplicates build time and adds complexity into the recipe which
we can avoid using PACKAGECONFIG. Yes that has complexities of its own
but the sooner we start experimenting with it, the sooner we'll work
through any issues. There are certainly ways we can make things neater.
If it really does turn out to be a bad idea we can come up with good
reasons why we should get rid of it.

FWIW, if you want an example of how badly wrong a two recipe approach
can get, see the dpkg/update-alternatives mess I fixed yesterday.

Cheers,

Richard
Koen Kooi - Nov. 15, 2011, 2:55 p.m.
Op 15 nov. 2011, om 15:42 heeft Richard Purdie het volgende geschreven:

> On Tue, 2011-11-15 at 14:59 +0100, Koen Kooi wrote:
>> Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:
>>> To put this quite simply, I think there is no good reason we shouldn't
>>> use the mechanism we've selected to handle this kind of problem. We
>>> should have defaults the reflect backwards compatibility. Other than
>>> that where is the problem other than a general objection to
>>> PACKAGECONFIG?
>> 
>> It forces a choice when there is a solution where things can coexist.
> 
> There are multiple ways of coexisting and the configuration changing
> based on DISTRO_FEATURES doesn't force a choice either.

It does force a choice, since you don't want to change DISTRO_FEATURES when distributing binaries. If changing it is safe, then it isn't a DISTRO_FEATURE.

regards,

Koen
Richard Purdie - Nov. 15, 2011, 3:12 p.m.
On Tue, 2011-11-15 at 15:55 +0100, Koen Kooi wrote:
> Op 15 nov. 2011, om 15:42 heeft Richard Purdie het volgende geschreven:
> 
> > On Tue, 2011-11-15 at 14:59 +0100, Koen Kooi wrote:
> >> Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:
> >>> To put this quite simply, I think there is no good reason we shouldn't
> >>> use the mechanism we've selected to handle this kind of problem. We
> >>> should have defaults the reflect backwards compatibility. Other than
> >>> that where is the problem other than a general objection to
> >>> PACKAGECONFIG?
> >> 
> >> It forces a choice when there is a solution where things can coexist.
> > 
> > There are multiple ways of coexisting and the configuration changing
> > based on DISTRO_FEATURES doesn't force a choice either.
> 
> It does force a choice, since you don't want to change DISTRO_FEATURES
> when distributing binaries. If changing it is safe, then it isn't a
> DISTRO_FEATURE.

I'd expect a given distro to be able to figure out in advance whether it
intends to have X11 or not?

If unsure you leave it present...

I really don't see the problem here.

Cheers,

Richard
Koen Kooi - Nov. 15, 2011, 3:23 p.m.
Op 15 nov. 2011, om 16:12 heeft Richard Purdie het volgende geschreven:

> On Tue, 2011-11-15 at 15:55 +0100, Koen Kooi wrote:
>> Op 15 nov. 2011, om 15:42 heeft Richard Purdie het volgende geschreven:
>> 
>>> On Tue, 2011-11-15 at 14:59 +0100, Koen Kooi wrote:
>>>> Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:
>>>>> To put this quite simply, I think there is no good reason we shouldn't
>>>>> use the mechanism we've selected to handle this kind of problem. We
>>>>> should have defaults the reflect backwards compatibility. Other than
>>>>> that where is the problem other than a general objection to
>>>>> PACKAGECONFIG?
>>>> 
>>>> It forces a choice when there is a solution where things can coexist.
>>> 
>>> There are multiple ways of coexisting and the configuration changing
>>> based on DISTRO_FEATURES doesn't force a choice either.
>> 
>> It does force a choice, since you don't want to change DISTRO_FEATURES
>> when distributing binaries. If changing it is safe, then it isn't a
>> DISTRO_FEATURE.
> 
> I'd expect a given distro to be able to figure out in advance whether it
> intends to have X11 or not?
> 
> If unsure you leave it present...
> 
> I really don't see the problem here.

The patch here doesn't use 'x11', but 'gui' as PACKAGECONFIG. Triggering on x11 is fine in this case.

regards,

Koen
Paul Eggleton - Nov. 15, 2011, 3:24 p.m.
On Tuesday 15 November 2011 15:55:38 Koen Kooi wrote:
> Op 15 nov. 2011, om 15:42 heeft Richard Purdie het volgende geschreven:
> > On Tue, 2011-11-15 at 14:59 +0100, Koen Kooi wrote:
> >> Op 15 nov. 2011, om 14:43 heeft Richard Purdie het volgende geschreven:
> >>> To put this quite simply, I think there is no good reason we
> >>> shouldn't
> >>> use the mechanism we've selected to handle this kind of problem. We
> >>> should have defaults the reflect backwards compatibility. Other than
> >>> that where is the problem other than a general objection to
> >>> PACKAGECONFIG?
> >> 
> >> It forces a choice when there is a solution where things can coexist.
> > 
> > There are multiple ways of coexisting and the configuration changing
> > based on DISTRO_FEATURES doesn't force a choice either.
> 
> It does force a choice, since you don't want to change DISTRO_FEATURES when
> distributing binaries. If changing it is safe, then it isn't a
> DISTRO_FEATURE.

It forces nothing - in fact it allows a distro to make choices.

DISTRO_FEATURES and PACKAGECONFIG are both expressions of distro policy which 
is intended to be set before binaries are produced; PACKAGECONFIG is simply on 
a per-recipe basis rather than across multiple recipes.

Cheers,
Paul
Paul Eggleton - Nov. 15, 2011, 3:27 p.m.
On Tuesday 15 November 2011 16:23:07 Koen Kooi wrote:
> The patch here doesn't use 'x11', but 'gui' as PACKAGECONFIG. Triggering on
> x11 is fine in this case.

Unless I've misunderstood, PACKAGECONFIG's namespace is specific to the 
package; so it does not really matter what it is called. If we're talking 
about changing to use DISTRO_FEATURES then yes, x11 would be the feature to 
check for.

Cheers,
Paul

Patch

diff --git a/meta/recipes-devtools/distcc/distcc_2.18.3.bb b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
index ec6ffb3..e15af5e 100644
--- a/meta/recipes-devtools/distcc/distcc_2.18.3.bb
+++ b/meta/recipes-devtools/distcc/distcc_2.18.3.bb
@@ -4,11 +4,12 @@  compilation of C/C++/ObjC code across machines on a network."
 SECTION = "devel"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PR = "r7"
+PR = "r8"
 
-DEPENDS = "avahi ${GTKDEP}"
-GTKDEP_libc-uclibc = ""
-GTKDEP = "gtk+"
+DEPENDS = "avahi"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gui] = "--with-gtk,--without-gtk --without-gnome,gtk+"
 
 RRECOMMENDS_${PN} = "avahi-daemon"
 
@@ -28,20 +29,19 @@  inherit autotools pkgconfig update-rc.d
 
 INITSCRIPT_NAME = "distcc"
 
-EXTRA_OECONF = "--with-gtk"
-EXTRA_OECONF_libc-uclibc = "--without-gtk --without-gnome"
 do_install_append() {
     install -d ${D}${sysconfdir}/init.d/
     install -d ${D}${sysconfdir}/default
     install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
     install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
-    ${DESKTOPINSTALL}
+    ${@base_contains("PACKAGECONFIG", "gui", "desktop_install", "", d)}
 }
-DESKTOPINSTALL = ""
-DESKTOPINSTALL_libc-glibc () {
+
+desktop_install() {
     install -d ${D}${datadir}/distcc/
     install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
 }
+
 PACKAGES += "distcc-distmon-gnome"
 
 FILES_${PN} = " ${sysconfdir} \