public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Patrick Lauer <patrick@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] FEATURES use or misuse?
Date: Tue, 3 Nov 2009 23:04:58 +0100	[thread overview]
Message-ID: <200911032304.58321.patrick@gentoo.org> (raw)
In-Reply-To: <20091103222624.112091f5@gentoo.org>

On Tuesday 03 November 2009 22:26:24 Alexis Ballier wrote:
> > To quote:
> > "FEATURES is a portage specific package manager configuration
> > variable not specified in PMS and cannot reliably be used in ebuilds
> > or eclasses."
> 
> For distcc & ccache, let me quote ebuild.sh code:
> 
> if hasq distcc $FEATURES ; then
> 	export PATH="/usr/lib/distcc/bin:$PATH"
>         [[ -n $DISTCC_LOG ]] && addwrite "${DISTCC_LOG%/*}"
> fi
> 
> if hasq ccache $FEATURES ; then
> 	export PATH="/usr/lib/ccache/bin:$PATH"
> [...]
> 
> Do you want an example how to mimic this with portage without having
> neither distcc nor ccache in FEATURES?
> Even with portage, checking the FEATURES variable isn't reliable. If
> you do not want to fix the real bugs and check/disable distcc/ccache
> for any reason, then check PATH.
Well, if a user wants to shoot himself hard enough in the foot he (or she, or 
it) can do that. But in the general case we should allow silly assumptions, 
one of them being that if a user sets FEATURES="distcc" that he wants to use 
distcc and will use the portage mechanisms to enable it. The assumption that 
the FEATURE variable actually controls the behaviour of such features seems 
like a good idea to me, almost as good as digital watches.

> If you want to keep this simple, write an eclass providing functions
> for disabling/checking these features.
Wow, that's a nice way to make things complex :)
(and why not let the package manager manage such things?)
 
> > Well then, I suggest we finally start documenting reality and fix
> > PMS. The use of the FEATURES variable, while it has been there
> > for ... uhm ... as long as I can think back, actually :), should not
> > be randomly suppressed.
> 
> If you want to fix PMS, then send a patch 
I tried, and as I've been saying for a long time they get rejected.
Funnily not by any dev but by some random user, but who cares :)
With the current attitude PMS will be marginalized and worked around by 
people. Reality is what you perceive.

> rephrasing it to explain why
> it isn't correct to check FEATURES in some cases. On the other hand, as
> its name implies, PMS is a spec, not a documentation on why every
> single choice has been made.
It's not a spec. Any engineer who has been involved in the spec creation or 
update process will gladly show you where it fails (for example not 
documenting, on purpose, some bits instead of documenting them with the note 
that this is nonstandard behaviour. A real specification will document such 
errata because then anyone working with it knows the potential issues ...)

 
> > ( /me points at bash 3.0 )
> 
> Ever thought about backward compatibility and keeping a sane upgrade
> path? Because that's exactly what this EAPI & PMS debate is all about
> IMHO.
Well, I don't want to be rude to you. But please, try using the KDE eclass 
with bash 3.0. Or maybe, just for fun (yeah, I know) portage.

Please do it and then tell me how forcing bash 3.2, then documenting the need 
for bash 3.0, is in any way sane or consistent.

We broke backwards compatibility about a year ago. Since then we've collected 
so many bash-3.0-incompatible bits that a migration back is technically 
possible, but practically no longer an acceptable solution (And trying to 
force it will make you lots of new "friends"). Your objections come a year to 
late. Now we have to accept reality and decide how to live with it.

Calling EAPI is ... well ... I can't even think of a place to start to explain 
how wrong it is. How on earth are you going to parse an eclass that supports 
multiple EAPIs where one EAPI were to support features of bash 4? 
The only way to do it would be to force bash 4 on all lower EAPIs, or make 
per-EAPI eclasses, or forbid use of new bash features in eclasses.
All horrible ways to avoid fixing the problem. All workaroundable by just 
accepting things as they are.

Sometimes EAPI is not a viable solution to a problem.

Take care,

Patrick



  reply	other threads:[~2009-11-03 22:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03 15:48 [gentoo-dev] FEATURES use or misuse? Patrick Lauer
2009-11-03 17:27 ` Sebastian Pipping
2009-11-03 20:36   ` Patrick Lauer
2009-11-03 20:58     ` Ciaran McCreesh
2009-11-03 22:28       ` Patrick Lauer
2009-11-04  0:11         ` [gentoo-dev] " Ryan Hill
2009-11-04  8:26           ` Patrick Lauer
2009-11-05  1:36             ` Ryan Hill
2009-11-05  4:56               ` [gentoo-dev] a pragmatic approach to FEATURES [was FEATURES use or misuse?] Brian Harring
2009-11-05  8:49                 ` Thilo Bangert
2009-11-05  9:36                   ` Brian Harring
2009-11-08  9:21                     ` Thilo Bangert
2009-11-03 21:26 ` [gentoo-dev] FEATURES use or misuse? Alexis Ballier
2009-11-03 22:04   ` Patrick Lauer [this message]
2009-11-03 22:26     ` Ciaran McCreesh
2009-11-04  0:33     ` Sebastian Pipping
2009-11-04  8:26       ` Patrick Lauer
2009-11-03 23:04 ` David Leverton
2009-11-04  1:31   ` [gentoo-dev] " Duncan
2009-11-04 22:12 ` Peter Hjalmarsson
2009-11-05  5:04   ` Brian Harring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200911032304.58321.patrick@gentoo.org \
    --to=patrick@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox