public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] extending existing EAPI semantics
@ 2008-06-11  2:56 Brian Harring
  2008-06-11  3:20 ` Ciaran McCreesh
  0 siblings, 1 reply; 19+ messages in thread
From: Brian Harring @ 2008-06-11  2:56 UTC (permalink / raw
  To: gentoo-dev

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

Bit curious what folks opinions are re: conversion of eapi 
requirements into a function, instead of a var.  Essentially, 
currently-

"""
#my ebuild.
EAPI=1
inherit blah
DEPEND=monkey

funcs_and_such(){:;}

"""

pros:
* simple, and was enough to get EAPI off the ground w/out massive 
fighting (at least not WW3 level fighting)
* works fine for metadata key level changes, function changes, etc.  
I'm aware folks have stated "if DEPENDS changes, it won't be able to 
handle it"- they're frankly wrong, they're confusing that post 
sourcing EAPI is checked, *then* if EAPI is supported the metadata is 
handled, else the manager is signaled that an unknown eapi was 
encountered (essentially).  Continuing...

cons:
* EAPI var must be set effectively before any invocations occur.
* global scope invocations (inherit) must be eapi aware;
* future additions to global scope invocations (say elib) will result 
in an error spat by bash ("elib wasn't found").
* bash specific (which personally is fine to me, an ebuild is bash).
* doesn't address versioning changes.

Converting it into

"""
#my ebuild.
eapi 1
inherit blah
DEPEND=monkey

funcs_and_such(){:;}

"""

with eapi effectively being

eapi() {
 if [ "$1" == 1 ] || [ "$1" == 0 ];
   return # we know this eapi, can handle it
 fi
 die "unsupported eapi $1"
}

pros:
* same benefits as preexisting var approach.
* via conversion to invocation instead of var setting (which is 
untrappable), it's possible to bail the rest of the sourcing, thus 
preventing any error msgs for unknown global invocations (elib fex).
* easy to shoehorn in for any profile.bashrc compliant manager 
(portage/pkgcore); realize paludis is left out here (via it 
intentionally being left out of PMS atm by ciaran), but 
profile.bashrc *is* used by ebuild devs, thus it's a viable course (I 
don't see profile.bashrc ever going away basically).

cons:
* must be the first invocation.
* bash specific (again, ebuild is bash, new format can do things 
w/out having to worry about backwards compatibility).
* doesn't address versioning changes.


Basically, the proposal is an minor tweak of existing support- it has 
the benefit of avoiding the filename complaints from folks and 
addressing the usual "global scope invocation will breakzor in later 
versions" complaint from paludis folk.

It doesn't particularly provide for people shoving new versioning 
components in, but frankly that's fine due to the mess having 
versioning rules bound to EAPI would entail.

After comments from folks, although if a responder is going to state 
"filename is better!" skip it please, I already pointed out the diffs 
(meaning bluntly, kindly skip repeating what has already been said).

Cheers
~harring

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

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

end of thread, other threads:[~2008-06-19 13:11 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-11  2:56 [gentoo-dev] extending existing EAPI semantics Brian Harring
2008-06-11  3:20 ` Ciaran McCreesh
2008-06-11  3:33   ` Brian Harring
2008-06-11  3:38     ` Ciaran McCreesh
2008-06-11  4:10       ` Brian Harring
2008-06-11  4:25         ` Mike Kelly
2008-06-11  4:34           ` Luca Barbato
2008-06-11  5:16           ` Brian Harring
2008-06-11  5:22             ` Ciaran McCreesh
2008-06-11  5:33               ` Brian Harring
2008-06-11  5:37                 ` Ciaran McCreesh
2008-06-11  5:46                   ` Luca Barbato
2008-06-11  5:51                     ` Ciaran McCreesh
2008-06-11 11:15                       ` Brian Harring
2008-06-11 11:21                         ` Ciaran McCreesh
2008-06-11 11:58                           ` Luca Barbato
2008-06-11 12:04                             ` Richard Brown
2008-06-11 14:04                               ` Nirbheek Chauhan
2008-06-19 13:07         ` Peter Volkov

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