public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] virtualx eclass
@ 2008-10-16 13:44 Doug Goldstein
  2008-10-16 14:17 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Doug Goldstein @ 2008-10-16 13:44 UTC (permalink / raw
  To: gentoo-dev

While the rule of thumb has been if an eclass needs something it should
provide it's own depends. However the virtualx eclass needs to be
different simply because in some cases it's only uses for tests (this is
it's most common usage in the whole) tree. When it's used for tests
pulling in the xorg-server the most ideal situation would be if
xorg-server was only pulled in on USE=test because currently for anyone
emerging an app that uses GTK+ they have a weird situation in the fact
that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
most usages of the X USE flag), however GTK+ itself due to it's usage of
the virtualx eclass pulls in xorg-server when USE=X, which is only used
for tests. This results in a confusing experience for users looking to
built a headless machine.

It'd be a lot more consistent if ebuilds provided a USE flag or directly
depended on the xorg-server and then used the functions in the eclass.
So in summary, those are the changes I plan on making very shortly. If
someone's got some input, please speak up.

--
Doug Goldstein




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-dev]  Re: virtualx eclass
  2008-10-16 13:44 [gentoo-dev] virtualx eclass Doug Goldstein
@ 2008-10-16 14:17 ` Diego 'Flameeyes' Pettenò
  2008-10-16 14:32   ` Doug Goldstein
  2008-10-16 14:18 ` [gentoo-dev] " Doug Goldstein
  2008-10-16 15:35 ` Doug Goldstein
  2 siblings, 1 reply; 11+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2008-10-16 14:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

Doug Goldstein <cardoe@gentoo.org> writes:

> It'd be a lot more consistent if ebuilds provided a USE flag or directly
> depended on the xorg-server and then used the functions in the eclass.
> So in summary, those are the changes I plan on making very shortly. If
> someone's got some input, please speak up.

Kinda like good ol' kde.eclass:

VIRTUALX_ONLY_TEST="yes"

inherit virtualx

and instead of using IUSE=X for that, IUSE=test.

-- 
Diego "Flameeyes" Pettenò
http://blog.flameeyes.eu/

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-16 13:44 [gentoo-dev] virtualx eclass Doug Goldstein
  2008-10-16 14:17 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
@ 2008-10-16 14:18 ` Doug Goldstein
  2008-10-16 15:35 ` Doug Goldstein
  2 siblings, 0 replies; 11+ messages in thread
From: Doug Goldstein @ 2008-10-16 14:18 UTC (permalink / raw
  To: gentoo-dev

Doug Goldstein wrote:
> While the rule of thumb has been if an eclass needs something it should
> provide it's own depends. However the virtualx eclass needs to be
> different simply because in some cases it's only uses for tests (this is
> it's most common usage in the whole) tree. When it's used for tests
> pulling in the xorg-server the most ideal situation would be if
> xorg-server was only pulled in on USE=test because currently for anyone
> emerging an app that uses GTK+ they have a weird situation in the fact
> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
> most usages of the X USE flag), however GTK+ itself due to it's usage of
> the virtualx eclass pulls in xorg-server when USE=X, which is only used
> for tests. This results in a confusing experience for users looking to
> built a headless machine.
>
> It'd be a lot more consistent if ebuilds provided a USE flag or directly
> depended on the xorg-server and then used the functions in the eclass.
> So in summary, those are the changes I plan on making very shortly. If
> someone's got some input, please speak up.
>
>   
Dave Leverton brings up a better suggestion. Providing VIRTUALX_DEPS and
having the ebuild just toss that into it's depends as needed.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev]  Re: virtualx eclass
  2008-10-16 14:17 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
@ 2008-10-16 14:32   ` Doug Goldstein
  2008-10-16 15:15     ` Doug Goldstein
  0 siblings, 1 reply; 11+ messages in thread
From: Doug Goldstein @ 2008-10-16 14:32 UTC (permalink / raw
  To: gentoo-dev

Diego 'Flameeyes' Pettenò wrote:
> Doug Goldstein <cardoe@gentoo.org> writes:
>
>   
>> It'd be a lot more consistent if ebuilds provided a USE flag or directly
>> depended on the xorg-server and then used the functions in the eclass.
>> So in summary, those are the changes I plan on making very shortly. If
>> someone's got some input, please speak up.
>>     
>
> Kinda like good ol' kde.eclass:
>
> VIRTUALX_ONLY_TEST="yes"
>
> inherit virtualx
>
> and instead of using IUSE=X for that, IUSE=test.
>
>   
That leaves a conditional that must be evaluated in the global scope
every time the depends are looked at.

And if that isn't set then making xorg-server always required in DEPEND?

What about packages that rely on virtualx to depend on xorg-server for
them (i.e. a RDEPEND)?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev]  Re: virtualx eclass
  2008-10-16 14:32   ` Doug Goldstein
@ 2008-10-16 15:15     ` Doug Goldstein
  0 siblings, 0 replies; 11+ messages in thread
From: Doug Goldstein @ 2008-10-16 15:15 UTC (permalink / raw
  To: gentoo-dev

Doug Goldstein wrote:
> Diego 'Flameeyes' Pettenò wrote:
>   
>> Doug Goldstein <cardoe@gentoo.org> writes:
>>
>>   
>>     
>>> It'd be a lot more consistent if ebuilds provided a USE flag or directly
>>> depended on the xorg-server and then used the functions in the eclass.
>>> So in summary, those are the changes I plan on making very shortly. If
>>> someone's got some input, please speak up.
>>>     
>>>       
>> Kinda like good ol' kde.eclass:
>>
>> VIRTUALX_ONLY_TEST="yes"
>>
>> inherit virtualx
>>
>> and instead of using IUSE=X for that, IUSE=test.
>>
>>   
>>     
> That leaves a conditional that must be evaluated in the global scope
> every time the depends are looked at.
>
> And if that isn't set then making xorg-server always required in DEPEND?
>
> What about packages that rely on virtualx to depend on xorg-server for
> them (i.e. a RDEPEND)?
>
>   
For the third line item, those packages are broken in general and need
to be fixed so that's out of the scope of this.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-16 13:44 [gentoo-dev] virtualx eclass Doug Goldstein
  2008-10-16 14:17 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
  2008-10-16 14:18 ` [gentoo-dev] " Doug Goldstein
@ 2008-10-16 15:35 ` Doug Goldstein
  2008-10-16 21:54   ` Donnie Berkholz
  2008-10-20 21:50   ` Doug Goldstein
  2 siblings, 2 replies; 11+ messages in thread
From: Doug Goldstein @ 2008-10-16 15:35 UTC (permalink / raw
  To: gentoo-dev

Doug Goldstein wrote:
> While the rule of thumb has been if an eclass needs something it should
> provide it's own depends. However the virtualx eclass needs to be
> different simply because in some cases it's only uses for tests (this is
> it's most common usage in the whole) tree. When it's used for tests
> pulling in the xorg-server the most ideal situation would be if
> xorg-server was only pulled in on USE=test because currently for anyone
> emerging an app that uses GTK+ they have a weird situation in the fact
> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
> most usages of the X USE flag), however GTK+ itself due to it's usage of
> the virtualx eclass pulls in xorg-server when USE=X, which is only used
> for tests. This results in a confusing experience for users looking to
> built a headless machine.
>
> It'd be a lot more consistent if ebuilds provided a USE flag or directly
> depended on the xorg-server and then used the functions in the eclass.
> So in summary, those are the changes I plan on making very shortly. If
> someone's got some input, please speak up.
>
>   
Alright... after talking to Diego, Dave, and Remi the final result that
I've come up with is the following:

VIRTUALX_CONDITIONAL_USE="test"

inherit virtualx

That'll result in virtualx adding the following:

DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )"

if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds
initially) the default will be "X". Which means the default is the same
as what we've got today. If it's set to an empty string, it'll always be
required. Otherwise, it will use the supplied USE flag.

--
Doug Goldstein



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-16 15:35 ` Doug Goldstein
@ 2008-10-16 21:54   ` Donnie Berkholz
  2008-10-16 23:18     ` Bo Ørsted Andresen
  2008-10-20 21:50   ` Doug Goldstein
  1 sibling, 1 reply; 11+ messages in thread
From: Donnie Berkholz @ 2008-10-16 21:54 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]

On 11:35 Thu 16 Oct     , Doug Goldstein wrote:
> Doug Goldstein wrote:
> > While the rule of thumb has been if an eclass needs something it should
> > provide it's own depends. However the virtualx eclass needs to be
> > different simply because in some cases it's only uses for tests (this is
> > it's most common usage in the whole) tree. When it's used for tests
> > pulling in the xorg-server the most ideal situation would be if
> > xorg-server was only pulled in on USE=test because currently for anyone
> > emerging an app that uses GTK+ they have a weird situation in the fact
> > that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
> > most usages of the X USE flag), however GTK+ itself due to it's usage of
> > the virtualx eclass pulls in xorg-server when USE=X, which is only used
> > for tests. This results in a confusing experience for users looking to
> > built a headless machine.
> >
> > It'd be a lot more consistent if ebuilds provided a USE flag or directly
> > depended on the xorg-server and then used the functions in the eclass.
> > So in summary, those are the changes I plan on making very shortly. If
> > someone's got some input, please speak up.
> >
> >   
> Alright... after talking to Diego, Dave, and Remi the final result that
> I've come up with is the following:
> 
> VIRTUALX_CONDITIONAL_USE="test"
> 
> inherit virtualx
> 
> That'll result in virtualx adding the following:
> 
> DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )"
> 
> if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds
> initially) the default will be "X". Which means the default is the same
> as what we've got today. If it's set to an empty string, it'll always be
> required. Otherwise, it will use the supplied USE flag.

I'm not sure whether this would work, but one idea would be to handle 
dependencies depending on what's in IUSE of the ebuild inheriting.

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-16 21:54   ` Donnie Berkholz
@ 2008-10-16 23:18     ` Bo Ørsted Andresen
  0 siblings, 0 replies; 11+ messages in thread
From: Bo Ørsted Andresen @ 2008-10-16 23:18 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

On Thursday 16 October 2008 23:54:32 Donnie Berkholz wrote:
> I'm not sure whether this would work, but one idea would be to handle
> dependencies depending on what's in IUSE of the ebuild inheriting.

That would require ebuilds to set IUSE before inheriting the eclass.

-- 
Bo Andresen

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-16 15:35 ` Doug Goldstein
  2008-10-16 21:54   ` Donnie Berkholz
@ 2008-10-20 21:50   ` Doug Goldstein
  2008-10-22 11:06     ` Petteri Räty
  1 sibling, 1 reply; 11+ messages in thread
From: Doug Goldstein @ 2008-10-20 21:50 UTC (permalink / raw
  To: gentoo-dev

Doug Goldstein wrote:
> Doug Goldstein wrote:
>   
>> While the rule of thumb has been if an eclass needs something it should
>> provide it's own depends. However the virtualx eclass needs to be
>> different simply because in some cases it's only uses for tests (this is
>> it's most common usage in the whole) tree. When it's used for tests
>> pulling in the xorg-server the most ideal situation would be if
>> xorg-server was only pulled in on USE=test because currently for anyone
>> emerging an app that uses GTK+ they have a weird situation in the fact
>> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
>> most usages of the X USE flag), however GTK+ itself due to it's usage of
>> the virtualx eclass pulls in xorg-server when USE=X, which is only used
>> for tests. This results in a confusing experience for users looking to
>> built a headless machine.
>>
>> It'd be a lot more consistent if ebuilds provided a USE flag or directly
>> depended on the xorg-server and then used the functions in the eclass.
>> So in summary, those are the changes I plan on making very shortly. If
>> someone's got some input, please speak up.
>>
>>   
>>     
> Alright... after talking to Diego, Dave, and Remi the final result that
> I've come up with is the following:
>
> VIRTUALX_CONDITIONAL_USE="test"
>
> inherit virtualx
>
> That'll result in virtualx adding the following:
>
> DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )"
>
> if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds
> initially) the default will be "X". Which means the default is the same
> as what we've got today. If it's set to an empty string, it'll always be
> required. Otherwise, it will use the supplied USE flag.
>
>   
Turns out this situation breaks down when multiple USE flags are
required/used. One suggestion is to allow for that via:

VIRTUALX_CONDITIONAL_USE="test X"

but needs someone to write some elegant shell to make that expansion
happen. Also, it'll happen in the global scope when the data is cached
so a little ugh on that part.

The last fall back of course is to go to just defining VIRTUALX_DEPS and
letting each ebuild USE it how it needs to use it.

Feedback, comments, etc are appreciated.

--
Doug Goldstein



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-20 21:50   ` Doug Goldstein
@ 2008-10-22 11:06     ` Petteri Räty
  2008-10-28 17:32       ` Doug Goldstein
  0 siblings, 1 reply; 11+ messages in thread
From: Petteri Räty @ 2008-10-22 11:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2486 bytes --]

Doug Goldstein wrote:
> Doug Goldstein wrote:
>> Doug Goldstein wrote:
>>   
>>> While the rule of thumb has been if an eclass needs something it should
>>> provide it's own depends. However the virtualx eclass needs to be
>>> different simply because in some cases it's only uses for tests (this is
>>> it's most common usage in the whole) tree. When it's used for tests
>>> pulling in the xorg-server the most ideal situation would be if
>>> xorg-server was only pulled in on USE=test because currently for anyone
>>> emerging an app that uses GTK+ they have a weird situation in the fact
>>> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
>>> most usages of the X USE flag), however GTK+ itself due to it's usage of
>>> the virtualx eclass pulls in xorg-server when USE=X, which is only used
>>> for tests. This results in a confusing experience for users looking to
>>> built a headless machine.
>>>
>>> It'd be a lot more consistent if ebuilds provided a USE flag or directly
>>> depended on the xorg-server and then used the functions in the eclass.
>>> So in summary, those are the changes I plan on making very shortly. If
>>> someone's got some input, please speak up.
>>>
>>>   
>>>     
>> Alright... after talking to Diego, Dave, and Remi the final result that
>> I've come up with is the following:
>>
>> VIRTUALX_CONDITIONAL_USE="test"
>>
>> inherit virtualx
>>
>> That'll result in virtualx adding the following:
>>
>> DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )"
>>
>> if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds
>> initially) the default will be "X". Which means the default is the same
>> as what we've got today. If it's set to an empty string, it'll always be
>> required. Otherwise, it will use the supplied USE flag.
>>
>>   
> Turns out this situation breaks down when multiple USE flags are
> required/used. One suggestion is to allow for that via:
> 
> VIRTUALX_CONDITIONAL_USE="test X"
> 
> but needs someone to write some elegant shell to make that expansion
> happen. Also, it'll happen in the global scope when the data is cached
> so a little ugh on that part.
> 

Huh?

VIRTUALX_DEPS="<insert eclass needed atoms here>"
for flag in ${VIRTUALX_CONDITIONAL_USE}; do
	DEPEND="${DEPEND} ${flag}? ( ${VIRTUALX_DEPS )"
done

Am I missing something here?
The ebuild itself can then check if both need to be enabled etc.

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] virtualx eclass
  2008-10-22 11:06     ` Petteri Räty
@ 2008-10-28 17:32       ` Doug Goldstein
  0 siblings, 0 replies; 11+ messages in thread
From: Doug Goldstein @ 2008-10-28 17:32 UTC (permalink / raw
  To: gentoo-dev

Petteri Räty wrote:
> Doug Goldstein wrote:
>   
>> Doug Goldstein wrote:
>>     
>>> Doug Goldstein wrote:
>>>   
>>>       
>>>> While the rule of thumb has been if an eclass needs something it should
>>>> provide it's own depends. However the virtualx eclass needs to be
>>>> different simply because in some cases it's only uses for tests (this is
>>>> it's most common usage in the whole) tree. When it's used for tests
>>>> pulling in the xorg-server the most ideal situation would be if
>>>> xorg-server was only pulled in on USE=test because currently for anyone
>>>> emerging an app that uses GTK+ they have a weird situation in the fact
>>>> that all of GTK+'s depends that have USE=X use it to mean libX11 (as do
>>>> most usages of the X USE flag), however GTK+ itself due to it's usage of
>>>> the virtualx eclass pulls in xorg-server when USE=X, which is only used
>>>> for tests. This results in a confusing experience for users looking to
>>>> built a headless machine.
>>>>
>>>> It'd be a lot more consistent if ebuilds provided a USE flag or directly
>>>> depended on the xorg-server and then used the functions in the eclass.
>>>> So in summary, those are the changes I plan on making very shortly. If
>>>> someone's got some input, please speak up.
>>>>
>>>>   
>>>>     
>>>>         
>>> Alright... after talking to Diego, Dave, and Remi the final result that
>>> I've come up with is the following:
>>>
>>> VIRTUALX_CONDITIONAL_USE="test"
>>>
>>> inherit virtualx
>>>
>>> That'll result in virtualx adding the following:
>>>
>>> DEPEND="test? ( x11-base/xorg-server x11-apps/xhost )"
>>>
>>> if VIRTUALX_CONDITIONAL_USE is unset (as it will be for all ebuilds
>>> initially) the default will be "X". Which means the default is the same
>>> as what we've got today. If it's set to an empty string, it'll always be
>>> required. Otherwise, it will use the supplied USE flag.
>>>
>>>   
>>>       
>> Turns out this situation breaks down when multiple USE flags are
>> required/used. One suggestion is to allow for that via:
>>
>> VIRTUALX_CONDITIONAL_USE="test X"
>>
>> but needs someone to write some elegant shell to make that expansion
>> happen. Also, it'll happen in the global scope when the data is cached
>> so a little ugh on that part.
>>
>>     
>
> Huh?
>
> VIRTUALX_DEPS="<insert eclass needed atoms here>"
> for flag in ${VIRTUALX_CONDITIONAL_USE}; do
> 	DEPEND="${DEPEND} ${flag}? ( ${VIRTUALX_DEPS )"
> done
>
> Am I missing something here?
> The ebuild itself can then check if both need to be enabled etc.
>
> Regards,
> Petteri
>
>   
All that's going to do is create the following..

DEPEND="X? ( ${VIRTUALX_DEPS} ) test? ( ${VIRTUALX_DEPS} )"

Which would make it depend on the dependencies when either USE="test" or
USE="X", which is not what we want. We want it when BOTH are set.

Right now there's no viable solution short of my original proposal which
involves having each ebuild stick ${VIRTUALX_DEPS} where it needs them.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-10-28 17:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16 13:44 [gentoo-dev] virtualx eclass Doug Goldstein
2008-10-16 14:17 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
2008-10-16 14:32   ` Doug Goldstein
2008-10-16 15:15     ` Doug Goldstein
2008-10-16 14:18 ` [gentoo-dev] " Doug Goldstein
2008-10-16 15:35 ` Doug Goldstein
2008-10-16 21:54   ` Donnie Berkholz
2008-10-16 23:18     ` Bo Ørsted Andresen
2008-10-20 21:50   ` Doug Goldstein
2008-10-22 11:06     ` Petteri Räty
2008-10-28 17:32       ` Doug Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox