useflag policies

classic Classic list List threaded Threaded
135 messages Options
12345 ... 7
Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ben de Groot-2
On 3 August 2015 at 11:30, Rich Freeman <[hidden email]> wrote:

> On Sun, Aug 2, 2015 at 11:24 PM, Ben de Groot <[hidden email]> wrote:
>>> I want to use fooplayer and bargrapher which are two qt-based
>>> applications.  fooplayer only supports qt4, and bargrapher only
>>> supports qt5.  What USE flags should I set, without restorting to
>>> per-package flags?
>>
>> These packages would not have useflags, as they only use one toolkit.
>>
>
> What if qt support is optional, and I do/don't want it enabled?

Users who don't care, simply follow the defaults as set by the package
maintainer or profile. Users who do care wouldn't mind adding a rule
to their package.use.

--
Cheers,

Ben | yngwin
Gentoo developer

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Daniel Campbell (zlg)
In reply to this post by Rich Freeman
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 08/02/2015 12:12 PM, Rich Freeman wrote:

> On Sun, Aug 2, 2015 at 2:21 PM, Andrew Savchenko
> <[hidden email]> wrote:
>>
>> This is a clean solution for developers and maintainers, but not
>> for ordinary users — they will confused by "qt qt4 qt5": "what
>> is 'qt', how is it different from 'qt4' and 'qt5'. What you are
>> really doing is implementing second-level USE flags, while they
>> were supposed to be linear.
>
> No argument that it isn't intuitive, but setting USE=qt and
> forgetting about it certainly seems more user-friendly than setting
> qt4/qt5 on individual packages and worrying about which is better
> where.  To some extent the current qt policy accomplishes this, but
> it sacrifices control when users actually do want it.
>
> I'm a bit torn on the issue myself, but just telling users to set
> USE=qt and forget about it unless you really care seems pretty
> simple to me.  The documentation for USE=qt4/qt5 could say "this is
> an advanced setting for users who want to prefer the qt4
> implementation over others - set USE=qt if all you care about is qt
> support."
>
I like this idea. USE=qt for all apps that optionally support or need
it, qt4/qt5 for apps that support both. We can default to qt5 and
users can still choose qt4 if they prefer it.

- --
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVvxjcAAoJEAEkDpRQOeFwbIsQAJeCSW9NHUFyXirEhh/pL7cP
Vc5F6bgxZhJ1svHiCxMAQuFz5POG/yxjq6iAwjtCaDaWBDj/HbSDe69Pu0HBcCkK
ezb2AJTtacvkWDxlJhH4H9m7QB3M9/XWlKlfMAhKnDEaSFS/yieR578LE1sNd2aF
A9JditTliVqmRr3DYNvT4JlqGIBJyU43gR75gW2gHyWE0FTZ4Rv8k6DQHJuseFb6
OvWWrDCKZQZqLmLIvpvz1ksyXuFis8qqCPLws37awo56kjT8jDJ+kdulwFGdvxui
zrau+MtufhDwehVsVKKe1j/6dhVnmOqlIZd3H7Pule9jFsH6AGRN4s2dL2bp9vqi
WdmQI8B6eDvdUK0Il1+zd7V1Uq8DXIYpTlOYrUHtnAlyaT8ln7FqojSKODASZ/10
LkJQ9SLv7ej6nQLnkYe4F1FQqssPqGe4v2tAZcFVu2pYda3KCP7PJKT70oFtzwrQ
76jVgp5Ryp/cbZrM2tOEcvb/3kTXDHDW2Wavh+VV7XwBmTvXoXqZas+eHMMtbyDJ
1cofAFRvu6HWnITTg3ZPoiQbm5Sq4rjG7aUvkyUxIoC8YzhXdHOTBpaYaFe6nZ/f
45e7lHq4iDsArmBn2BiF4kBKZh8I5xMY1/K10mC8/4emBS3NHbafOUKqujCCqLMj
dhh/jF4gLzALPIDGXBRp
=j7X5
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Daniel Campbell (zlg)
In reply to this post by Andrew Savchenko
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 08/02/2015 10:33 AM, Andrew Savchenko wrote:

> On Mon, 3 Aug 2015 00:34:51 +0800 Ben de Groot wrote:
>> Recently some team members of the Qt project have adopted these
>> ebuild policies:
>> https://wiki.gentoo.org/wiki/Project:Qt/Policies
>>
>> I have an issue with the policy adopted under "Requires one of
>> two Qt versions". In my opinion, in the case where a package
>> offers a choice between qt4 or qt5, we should express this in
>> explicit useflags
>
> This is what the policy does: "Implement both qt4 and qt5 USE
> flags"
>
>> and a REQUIRED_USE="^^ ( qt4 qt5 )". This offers the user the
>> clearest choice.
>
> This will create insane amount of blockers if users have both
> flags in make.conf (and this is a common scenario).
>
>> Other developers state that users are not interested in such
>> implementation details, or that forced choice through
>> REQUIRED_USE is too much of a hassle. This results in current
>> ebuilds such as quassel to not make it clear that qt4 is an
>> option.
>>
>> This goes against the principle of least surprise, as well as
>> against QA recommendations. I would like to hear specifically
>> from QA about how we should proceed, but comments from the wider
>> developer community are also welcome.
>
> As far as I understand this is done to simplify user's experiense:
> usually people set both USE="qt4 qt5" in global make.conf, because
> they want qt in the first place.
>
> This policy will allow to USE both qt versions whichever is
> available preferring newer one. Quite reasonable approach.
> Alternatives (^^() and ??()) will require micromanagement (e.g.
> pagkage.use.conf) for dozens if not hundreds of packages for no
> good reason. If someone still needs to override such policy (e.g.
> to use qt4 when both are available), this can be done by
> per-package configuration.
>
> My idea is that packages should be fully controllable, but choises
> of default behaviour should be done so, that in most cases
> micromanagement will not be necessary.
>
> I like this qt policy and I'm not sure if it violates any current
> rule. But even in such case this rule should be fixed. Moreover,
> this problem is not limited for qt: we have exactly the same issue
> with gtk2 vs gtk3 and probably some other technologies.
>
> Of course in theory it is possible to build package with two sets
> of binaries supporting both qt4 and qt5, but I see little
> practical need for that.
>
> So I propose to add somewhere to devmanual/policies the following
> recommendation: "If package supports several versions of the same
> technology (e.g. qt4 and qt5) and more than one is enabled by USE
> flags, ebuild should prefer the later one (in terms of technology
> generation).".
>
> Best regards, Andrew Savchenko
>
+1
- --
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVvxlqAAoJEAEkDpRQOeFwRqAP/jLkyzsJ0lPind06f8YvQ4aF
Nog8g2pJHJUYXryJwCZpedj4Ju8QWnlE9qOLFO/PvKjNq1AddI7PB/BpUAK1HBuq
9T319lQttGyZAFqEeYm3j1c7IcQInNSXaGLJnLVw19UWgUg1ZuTxiec7XJ7Qovmy
D1BdZrMSVhxzSfCKN0kGM3IDxgInVWnEhPCiqDzDMT/U9j1K1sOFA/77/M+HbEvp
LP26R/ICdznLNTRqAQxBn6TnZ0D6LMp+ngWCvSa07XCyn3O2K1cQA012l3hQ4/Jb
+GP3mk6UM3rhn5saZ+2nJM5axFNylTFcJnqJFjU6//Q7q3C0Xh4sEuu8n3ywgiG4
8Mmta0i9TgGcIjfnCcDpMO6Yvs1g79Hgg3A87tCzJEaYRXWlHjGY+YsoYVIvPS6d
qNdhG8+/8hhQUQy4gcmT7M5HZVkMj/hmju+X9bCPbDrJY6Xii90ZbvCZGiPBAJbm
VebTPg5CAzybhqtYAOiygLKMqh1Sw8LrFlBSAMJpLr89CHN0ODuzQp+Rho6rYcp0
t2J8AWJHW2XJ8TePvDpCDkEog83c1sSxKPqsu8AHTPcw+Bvol4vpmUsv0BQlp9aa
F4ZXxccqTzbZtwJ9x7jBGjlBl6H4Bu0OE/y7nUPG9aTldxMfnEgJeEktUtpAlWCu
fYSYVLjlNUl9OtL/ElnI
=fRV1
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Michael Palimaka
In reply to this post by NP-Hardass-2
On 03/08/15 07:14, NP-Hardass wrote:
> ^^ has the pleasant side effect of being easier to read, as a user. The
> user receives a message saying "at-most-one-of" instead of some
> convoluted other expression that they don't understand.
>
> I am all for the use of ^^ add the default for this reason.

This introduces a usability nightmare for anyone with both qt4 and qt5
in their global USE flags (a common configuration).


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

James Le Cuirot
On Mon, 3 Aug 2015 21:23:37 +1000
Michael Palimaka <[hidden email]> wrote:

> On 03/08/15 07:14, NP-Hardass wrote:
> > ^^ has the pleasant side effect of being easier to read, as a user.
> > The user receives a message saying "at-most-one-of" instead of some
> > convoluted other expression that they don't understand.
> >
> > I am all for the use of ^^ add the default for this reason.
>
> This introduces a usability nightmare for anyone with both qt4 and qt5
> in their global USE flags (a common configuration).

What if we had something like this?

REQUIRED_IUSE="^^qt ( qt5 qt4 )"

Users who don't care would set just qt rather than qt4 or qt5 and this
mechanism would automatically enable whichever one appears first in the
brackets. If qt4 or qt5 (or both) are set then the behaviour would
remain as it is now. Or perhaps some variation on this?

I'm not declaring this to be a great idea, just throwing it out there
for consideration. :)

--
James Le Cuirot (chewi)
Gentoo Linux Developer

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Dale-46
In reply to this post by Michael Palimaka
Michael Palimaka wrote:

> On 03/08/15 07:14, NP-Hardass wrote:
>> ^^ has the pleasant side effect of being easier to read, as a user. The
>> user receives a message saying "at-most-one-of" instead of some
>> convoluted other expression that they don't understand.
>>
>> I am all for the use of ^^ add the default for this reason.
> This introduces a usability nightmare for anyone with both qt4 and qt5
> in their global USE flags (a common configuration).
>
>
>


As a Gentoo user.  This is what I have set and what I hope to get
because of the settings.  I have both qt4 and qt5 set in make.conf for
my USE flags.  I expect qt5 for whatever packages can work with qt5 and
qt4 for whatever isn't ready for qt5 but requires qt.  If for some
reason a package isn't quite ready for qt5 and won't function correctly
for me, I can always set that in package.use until it is.  My current
entries for this:

media-libs/phonon-vlc qt5
media-video/mkvtoolnix -qt5

I don't have notes on that so not sure what was ran into to require
those.  I may comment those out and give them another try.

Point of this post, provide a little user info about expectations and
settings.  Y'all sort out the best way forward and let us know if we
need to change something.  :-)

Dale

:-)  :-)


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Alan McKinnon-2
On 03/08/2015 15:07, Dale wrote:

> Michael Palimaka wrote:
>> On 03/08/15 07:14, NP-Hardass wrote:
>>> ^^ has the pleasant side effect of being easier to read, as a user. The
>>> user receives a message saying "at-most-one-of" instead of some
>>> convoluted other expression that they don't understand.
>>>
>>> I am all for the use of ^^ add the default for this reason.
>> This introduces a usability nightmare for anyone with both qt4 and qt5
>> in their global USE flags (a common configuration).
>>
>>
>>
>
>
> As a Gentoo user.  This is what I have set and what I hope to get
> because of the settings.  I have both qt4 and qt5 set in make.conf for
> my USE flags.  I expect qt5 for whatever packages can work with qt5 and
> qt4 for whatever isn't ready for qt5 but requires qt.  If for some
> reason a package isn't quite ready for qt5 and won't function correctly
> for me, I can always set that in package.use until it is.  My current
> entries for this:
>
> media-libs/phonon-vlc qt5
> media-video/mkvtoolnix -qt5
>
> I don't have notes on that so not sure what was ran into to require
> those.  I may comment those out and give them another try.
>
> Point of this post, provide a little user info about expectations and
> settings.  Y'all sort out the best way forward and let us know if we
> need to change something.  :-)


Dale and I think alike.

I also have Qt4 and Qt5 installed, and I expect packages that use them
to link to the version that works better (understanding that "better" is
usually the opinion of upstream and the devs). If I decide I care about
which one works better for a given package, then I'm happy to
package.use but mostly I like that file to be as empty as I can get it.

What I don't want is for the machinery to give the impression that I
can't just go with whatever the dev put in the ebuild for the general
case. I also don't want to have to keep going back to use.desc because
it's not obvious what the flag probably does.

--
Alan McKinnon
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Maciej Mrozowski-2
In reply to this post by Rich Freeman
On Sunday 02 of August 2015 21:37:36 Rich Freeman wrote:
|  The approach qt4=qt4
| and qt5=qt5 seems simpler on the surface, but it means that users end
| up having to set tons of per-package configurations when they don't
| actually care which one they use,

I will risk a thesis that if they didn't care, they wouldn't have chosen
Gentoo...

regards
MM

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Dale-46
Maciej Mrozowski wrote:

> On Sunday 02 of August 2015 21:37:36 Rich Freeman wrote:
> |  The approach qt4=qt4
> | and qt5=qt5 seems simpler on the surface, but it means that users end
> | up having to set tons of per-package configurations when they don't
> | actually care which one they use,
>
> I will risk a thesis that if they didn't care, they wouldn't have chosen
> Gentoo...
>
> regards
> MM
>
>

You may lose that one if I'm seeing your point correctly.  See Alan and
my earlier replies.  I have both qt4 and qt5 set and I leave which is
best to use to the devs to control in the ebuild.  If for example qt5
does not work well for a package, let the ebuild pick qt4 for that
package.  If qt5 works reliably, then build with qt5.  If I have a
problem with it, then I can set it in package.use if needed, doesn't
build or function correctly or I want qt5 even if it isn't stable.  As
things switch to qt5 more, I don't have to do anything except let the
updates roll out as they become stable and the dev sets that in the
ebuild.

Keep in mind, devs already do a LOT of the selection process.
Otherwise, we could set any and every USE flag and package combination
there is without any restrictions.  In other words, we could have USE
flag soup even if it is known that two or more USE flags clash.  As it
is, if a dev knows two flags clash, we get a nifty error message and
then we get to figure out how to get it to work right, sometimes
portage's error message is cryptic to say the least.

If I took your point wrong, my apologies.

Lowly user.

Dale

:-)  :-)


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Rich Freeman
In reply to this post by Maciej Mrozowski-2
On Mon, Aug 3, 2015 at 3:07 PM, Maciej Mrozowski <[hidden email]> wrote:
> On Sunday 02 of August 2015 21:37:36 Rich Freeman wrote:
> |  The approach qt4=qt4
> | and qt5=qt5 seems simpler on the surface, but it means that users end
> | up having to set tons of per-package configurations when they don't
> | actually care which one they use,
>
> I will risk a thesis that if they didn't care, they wouldn't have chosen
> Gentoo...
>

Obviously there are many reasons people use Gentoo, but here is my
perspective on this.

The value of Gentoo is that it gives you a LOT of power to tweak
individual package configurations, without the requirement to do this
for everything.  There are packages that I carefully configure USE
flags for, CFLAGS for, epatch_user, and so on.  Heck, some packages I
run in containers where I can carefully control almost all aspects of
their environment.  Then on the same host I'll have screen and bash
and a million other packages installed where exact configuration is
not critical, and so I want it to "just work."  If I wanted to
micromanage everything I might as well run Linux From Scratch.

Gentoo should be the best of both worlds.  We should give users the
power to tweak things, but we shouldn't force them to play with config
files all day long just to have a functional system.  If users want to
care we let them care instead of telling them "don't touch" like most
other distros, but if they don't care we still provide reasonable
defaults.

--
Rich

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Alan McKinnon-2
On 03/08/2015 22:20, Rich Freeman wrote:

> On Mon, Aug 3, 2015 at 3:07 PM, Maciej Mrozowski <[hidden email]> wrote:
>> On Sunday 02 of August 2015 21:37:36 Rich Freeman wrote:
>> |  The approach qt4=qt4
>> | and qt5=qt5 seems simpler on the surface, but it means that users end
>> | up having to set tons of per-package configurations when they don't
>> | actually care which one they use,
>>
>> I will risk a thesis that if they didn't care, they wouldn't have chosen
>> Gentoo...
>>
>
> Obviously there are many reasons people use Gentoo, but here is my
> perspective on this.
>
> The value of Gentoo is that it gives you a LOT of power to tweak
> individual package configurations, without the requirement to do this
> for everything.  There are packages that I carefully configure USE
> flags for, CFLAGS for, epatch_user, and so on.  Heck, some packages I
> run in containers where I can carefully control almost all aspects of
> their environment.  Then on the same host I'll have screen and bash
> and a million other packages installed where exact configuration is
> not critical, and so I want it to "just work."  If I wanted to
> micromanage everything I might as well run Linux From Scratch.
>
> Gentoo should be the best of both worlds.  We should give users the
> power to tweak things, but we shouldn't force them to play with config
> files all day long just to have a functional system.  If users want to
> care we let them care instead of telling them "don't touch" like most
> other distros, but if they don't care we still provide reasonable
> defaults.
>

+1

One of the most powerful aspects of ebuilds is the ability to not have
to control something the user does not want to. I use Gentoo because I
can control what I wish and like Rich the bits I want to control are a
small fraction of the whole.

When a dev says "I will risk a thesis that if they didn't care, they
wouldn't have chosen Gentoo", there is a place for that but it is by no
means the general case. We DO accommodate the control freaks, we let
them USE="-*" and let them keep all the tiny shards.

But the truth is far more subtle than a care-all/care-none scenario.

I say stick with reasonable defaults, and for better or worse, that
includes "use highest version in ACCEPT_KEYWORDS unless user says otherwise"


--
Alan McKinnon
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ben de Groot-2
In reply to this post by Rich Freeman
On 4 August 2015 at 04:20, Rich Freeman <[hidden email]> wrote:
> [...]
> Gentoo should be the best of both worlds.  We should give users the
> power to tweak things, but we shouldn't force them to play with config
> files all day long just to have a functional system.  If users want to
> care we let them care instead of telling them "don't touch" like most
> other distros, but if they don't care we still provide reasonable
> defaults.

And that is exactly what we do. The kde profile enables qt4, the
plasma profile enables qt5, the other profiles have no qt* useflags
enabled. These are reasonable defaults.

Of course some users will proceed to enable both qt4 and qt5 globally
in their make.conf, but I don't think it is unreasonable to expect
them to then deal with adding exceptions to package.use for those
packages where exactly-one-of is required.

In my opinion, this is the way Gentoo has always worked, and we should
simply recommend users to only set one of the qt* useflags as globally
enabled, if they want to prevent such micro-management. Hiding the qt4
option is in my opinion the wrong solution around people complaining
after they have consciously enabled both flags.

If this is not acceptable (or "absolutely unusable" as one dev put
it), then we need a proper solution, which a) will not hide the qt4
option, and b) will prevent triggering required_use blockage by
choosing qt5 over qt4 in case both are enabled, while c) informing the
user about this. This probably requires new eclass or even EAPI
functionality.

In the meantime, we should stick with the policies adopted at the qt3
to qt4 transition (explicit versioned useflags) and let the user deal
with per-package management if they enable both flags.

--
Cheers,

Ben | yngwin
Gentoo developer

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Alexandre Rostovtsev-2
On Tue, 2015-08-04 at 11:59 +0800, Ben de Groot wrote:

> On 4 August 2015 at 04:20, Rich Freeman <[hidden email]> wrote:
> > [...]
> > Gentoo should be the best of both worlds.  We should give users the
> > power to tweak things, but we shouldn't force them to play with config
> > files all day long just to have a functional system.  If users want to
> > care we let them care instead of telling them "don't touch" like most
> > other distros, but if they don't care we still provide reasonable
> > defaults.
>
> And that is exactly what we do. The kde profile enables qt4, the
> plasma profile enables qt5, the other profiles have no qt* useflags
> enabled. These are reasonable defaults.
That is not correct. The desktop profile enables qt4, because it is a
reasonable default (for qt-only packages, USE=-qt4 means "don't build
any gui", but desktop users always expect some kind of a gui by
default, whether it's gtk or qt*.)

The result is that qt4 is enabled in child profiles of desktop - gnome
and kde and plasma. Since plasma enables qt5 and does nothing with qt4,
you have all qt versions enabled there.

And when popular qt5-only, gui-optional packages appear in the tree, we
will need to enable qt5 in desktop profile too.

signature.asc (970 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Duncan-42
In reply to this post by Ben de Groot-2
Ben de Groot posted on Tue, 04 Aug 2015 11:59:40 +0800 as excerpted:

> In my opinion, this is the way Gentoo has always worked, and we should
> simply recommend users to only set one of the qt* useflags as globally
> enabled, if they want to prevent such micro-management. Hiding the qt4
> option is in my opinion the wrong solution around people complaining
> after they have consciously enabled both flags.
>
> If this is not acceptable (or "absolutely unusable" as one dev put it),
> then we need a proper solution, which a) will not hide the qt4 option,
> and b) will prevent triggering required_use blockage by choosing qt5
> over qt4 in case both are enabled, while c) informing the user about
> this. This probably requires new eclass or even EAPI functionality.

What about a solution such as that used by python, USE=qt, for turning on
qt support at all if it's optional, with QT_TARGETS for people to set to
the versions they want if more than one can be enabled at once, and
QT_SINGLE_TARGET for people to set to their preferred if a package can
build against only one at a time, but that one can be chosen?

And of course, just as with python, people can setup an /etc/portage/env/
* file for exceptions, and point as many packages at that file as desired
using package.env.[1]

But this would be dramatically simpler with qt than it is with python,
since there will normally only be two (with a theoretical but unlikely
possibility of three) choices at the same time, and the time between qt
slot upgrades and slot-effective times as well is much /much/ longer than
between python slot upgrades.

Of course it'd require a whole new set of eclasses, but it's not as if
that hasn't been done before.

[1] FWIW, that's the python solution I've been using for awhile, with
PYTHON_SINGLE_TARGET set to 3.3 and then 3.4 in make.conf, with an
/etc/portage/env/python.starget.27 file that does what the name suggests,
and formerly quite a few package entries in /etc/portage/package.env
pointing to it that couldn't handle python3 yet, but now only one, app-
text/asciidoc.

--
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ian Stakenvicius-2
In reply to this post by Daniel Campbell (zlg)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 03/08/15 03:34 AM, Daniel Campbell (zlg) wrote:

> On 08/02/2015 10:33 AM, Andrew Savchenko wrote:
>> On Mon, 3 Aug 2015 00:34:51 +0800 Ben de Groot wrote:
>>> Recently some team members of the Qt project have adopted
>>> these ebuild policies:
>>> https://wiki.gentoo.org/wiki/Project:Qt/Policies
>>>
>>> I have an issue with the policy adopted under "Requires one of
>>> two Qt versions". In my opinion, in the case where a package
>>> offers a choice between qt4 or qt5, we should express this in
>>> explicit useflags
>
>> This is what the policy does: "Implement both qt4 and qt5 USE
>> flags"
>
>>> and a REQUIRED_USE="^^ ( qt4 qt5 )". This offers the user the
>>> clearest choice.
>
>> This will create insane amount of blockers if users have both
>> flags in make.conf (and this is a common scenario).
>

Why exactly do we need to force-off the use flag for the one that
won't be used, anyways?  Yes, there are qt4 deps in VDB that likely
won't be necessary, which causes --depclean to not necessarily be able
to make -as clean- a system, but realistically this is pretty minor.
Also, i don't see why end-users are going to care; if they specify
USE="qt4 qt5" then they should expect the package to depend on both
sets of the qt deps.

As for the ambiguity of which one the package will use, I think we can
satisfy that the same way we do slots -- that is, the one with the
larger ${PV} (ie qt5) is the one that will be used when both are
available.  Intuitive, simple, and the system "just works".

Are there any cases where things actually break if a package has both
flags enabled? IE, is three a package with IUSE="qt4 qt5" that when
both flags are enabled would build for qt5 only, and happens to be a
dependency atom of something else that needs it to have qt4 support?
That to me is the only case where a REQUIRED_USE needs to be set on a
package.




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlXA0roACgkQAJxUfCtlWe0CMgD/QDNIoY5Ug2f3+6OwvpIX+KG3
EiF8jm7yhzgoWck4wE8A+wYqFvyKoAedjdNMR6JKfSTuKQLKj0/PoqPu3tqXfkcG
=l8Bx
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Davide Pesavento-2
In reply to this post by Alexandre Rostovtsev-2
On Mon, Aug 3, 2015 at 10:10 PM, Alexandre Rostovtsev
<[hidden email]> wrote:

> On Tue, 2015-08-04 at 11:59 +0800, Ben de Groot wrote:
>> On 4 August 2015 at 04:20, Rich Freeman <[hidden email]> wrote:
>> > [...]
>> > Gentoo should be the best of both worlds.  We should give users the
>> > power to tweak things, but we shouldn't force them to play with config
>> > files all day long just to have a functional system.  If users want to
>> > care we let them care instead of telling them "don't touch" like most
>> > other distros, but if they don't care we still provide reasonable
>> > defaults.
>>
>> And that is exactly what we do. The kde profile enables qt4, the
>> plasma profile enables qt5, the other profiles have no qt* useflags
>> enabled. These are reasonable defaults.
>
> That is not correct. The desktop profile enables qt4, because it is a
> reasonable default (for qt-only packages, USE=-qt4 means "don't build
> any gui", but desktop users always expect some kind of a gui by
> default, whether it's gtk or qt*.)
>
> The result is that qt4 is enabled in child profiles of desktop - gnome
> and kde and plasma. Since plasma enables qt5 and does nothing with qt4,
> you have all qt versions enabled there.
>
> And when popular qt5-only, gui-optional packages appear in the tree, we
> will need to enable qt5 in desktop profile too.

Exactly, +1.

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Davide Pesavento-2
In reply to this post by Ben de Groot-2
On Mon, Aug 3, 2015 at 8:59 PM, Ben de Groot <[hidden email]> wrote:

> On 4 August 2015 at 04:20, Rich Freeman <[hidden email]> wrote:
>> [...]
>> Gentoo should be the best of both worlds.  We should give users the
>> power to tweak things, but we shouldn't force them to play with config
>> files all day long just to have a functional system.  If users want to
>> care we let them care instead of telling them "don't touch" like most
>> other distros, but if they don't care we still provide reasonable
>> defaults.
>
> And that is exactly what we do. The kde profile enables qt4, the
> plasma profile enables qt5, the other profiles have no qt* useflags
> enabled. These are reasonable defaults.
>

As tetromino pointed out, this is very far from the real current situation.

> Of course some users will proceed to enable both qt4 and qt5 globally
> in their make.conf, but I don't think it is unreasonable to expect
> them to then deal with adding exceptions to package.use for those
> packages where exactly-one-of is required.
>
> In my opinion, this is the way Gentoo has always worked, and we should
> simply recommend users to only set one of the qt* useflags as globally
> enabled, if they want to prevent such micro-management. Hiding the qt4
> option is in my opinion the wrong solution around people complaining
> after they have consciously enabled both flags.
>
> If this is not acceptable (or "absolutely unusable" as one dev put
> it), then we need a proper solution, which a) will not hide the qt4
> option, and b) will prevent triggering required_use blockage by
> choosing qt5 over qt4 in case both are enabled, while c) informing the
> user about this. This probably requires new eclass or even EAPI
> functionality.
>

Please go ahead and design and implement such functionality (a sort of
REQUIRED_USE defaults). In the meantime, we will apply the policies
written in the Qt project wiki page.

> In the meantime, we should stick with the policies adopted at the qt3
> to qt4 transition (explicit versioned useflags) and let the user deal
> with per-package management if they enable both flags.
>

We didn't have REQUIRED_USE at the time of the qt3->qt4 transition, so
this point is completely moot.

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ben de Groot-2
In reply to this post by Ian Stakenvicius-2
On 4 August 2015 at 22:56, Ian Stakenvicius <[hidden email]> wrote:
> Are there any cases where things actually break if a package has both
> flags enabled? IE, is three a package with IUSE="qt4 qt5" that when
> both flags are enabled would build for qt5 only, and happens to be a
> dependency atom of something else that needs it to have qt4 support?
> That to me is the only case where a REQUIRED_USE needs to be set on a
> package.

I'm not aware we have such a package, but I may be overlooking
something. Either way, I think it is a dangerous road to go down that
way.

--
Cheers,

Ben | yngwin
Gentoo developer

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ben de Groot-2
In reply to this post by Davide Pesavento-2
On 5 August 2015 at 03:09, Davide Pesavento <[hidden email]> wrote:

> On Mon, Aug 3, 2015 at 8:59 PM, Ben de Groot <[hidden email]> wrote:
>> On 4 August 2015 at 04:20, Rich Freeman <[hidden email]> wrote:
>>> [...]
>>> Gentoo should be the best of both worlds.  We should give users the
>>> power to tweak things, but we shouldn't force them to play with config
>>> files all day long just to have a functional system.  If users want to
>>> care we let them care instead of telling them "don't touch" like most
>>> other distros, but if they don't care we still provide reasonable
>>> defaults.
>>
>> And that is exactly what we do. The kde profile enables qt4, the
>> plasma profile enables qt5, the other profiles have no qt* useflags
>> enabled. These are reasonable defaults.
>>
>
> As tetromino pointed out, this is very far from the real current situation.

Indeed, I was wrong here. We will need another solution.

>> Of course some users will proceed to enable both qt4 and qt5 globally
>> in their make.conf, but I don't think it is unreasonable to expect
>> them to then deal with adding exceptions to package.use for those
>> packages where exactly-one-of is required.
>>
>> In my opinion, this is the way Gentoo has always worked, and we should
>> simply recommend users to only set one of the qt* useflags as globally
>> enabled, if they want to prevent such micro-management. Hiding the qt4
>> option is in my opinion the wrong solution around people complaining
>> after they have consciously enabled both flags.
>>
>> If this is not acceptable (or "absolutely unusable" as one dev put
>> it), then we need a proper solution, which a) will not hide the qt4
>> option, and b) will prevent triggering required_use blockage by
>> choosing qt5 over qt4 in case both are enabled, while c) informing the
>> user about this. This probably requires new eclass or even EAPI
>> functionality.
>>
>
> Please go ahead and design and implement such functionality (a sort of
> REQUIRED_USE defaults).

Something along the lines of PYTHON_TARGETS could work. But
personally, I'm happy with REQUIRED_USE.

> In the meantime, we will apply the policies
> written in the Qt project wiki page.

Except for the one that is wrong.

>> In the meantime, we should stick with the policies adopted at the qt3
>> to qt4 transition (explicit versioned useflags) and let the user deal
>> with per-package management if they enable both flags.
>>
>
> We didn't have REQUIRED_USE at the time of the qt3->qt4 transition, so
> this point is completely moot.

We had something worse. That didn't prevent us from using it tho.

--
Cheers,

Ben | yngwin
Gentoo developer

Reply | Threaded
Open this post in threaded view
|

Re: useflag policies

Ian Stakenvicius-2
In reply to this post by Ben de Groot-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 05/08/15 02:38 AM, Ben de Groot wrote:

> On 4 August 2015 at 22:56, Ian Stakenvicius <[hidden email]>
> wrote:
>> Are there any cases where things actually break if a package has
>> both flags enabled? IE, is three a package with IUSE="qt4 qt5"
>> that when both flags are enabled would build for qt5 only, and
>> happens to be a dependency atom of something else that needs it
>> to have qt4 support? That to me is the only case where a
>> REQUIRED_USE needs to be set on a package.
>
> I'm not aware we have such a package, but I may be overlooking
> something. Either way, I think it is a dangerous road to go down
> that way.
>

I'm not aware of any either, although I haven't done a comprehensive
audit of the tree to find out.  I would find it unlikely that any such
package exists.

The thing is, we're already travelling that road (have been for a long
while), and IMO there is very little "cost" to travelling this road
compared to the so-called "proper" solution of forcing off one flag or
the other, ESPECIALLY when we are likely to have both flags default-on
soon in the generic desktop profile as was posted earlier.

If we do go the REQUIRED_USE="^^" route on packages, then I think it
would be best that we change the 'desktop' and other profiles s.t.
maintainers need to add their package with whichever flag should be
enabled (qt4 or qt5) to package.use, rather than having the qt*
flag(s) globally enabled in the profile -- otherwise we end up with
end-users having to deal with it.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlXCfk4ACgkQAJxUfCtlWe1CswEA0e4c/gRSbjg0b858+uVFc+z2
+05WUPjFsPpfXrdPs3wA/2r0PyitPRoZAWPWBKm8LhMAC5YIHtjhWA7kh2LTImAQ
=gyeU
-----END PGP SIGNATURE-----

12345 ... 7