FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-06-2009, 08:37 PM
Christian Faulhammer
 
Default x-modular.eclass: A modified approach to EAPI support

Hi,

Donnie Berkholz <dberkholz@gentoo.org>:
> Any thoughts?

Nice is the centralisation of the EAPI check although I also like to
see function execution by EAPI on the spot. What I don't like is dying
on an unknown EAPI. Is it in the range of possibilities that the
provided phases will change drastically with EAPI > 2?

V-Li


--
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>
 
Old 03-06-2009, 09:33 PM
Petteri Rty
 
Default x-modular.eclass: A modified approach to EAPI support

Donnie Berkholz wrote:
> I decided to try something a little different because I had some ideas
> for improving the existing EAPI patches I've seen going into other
> eclasses. So here is my patch for x-modular.eclass. I tested it with
> ebuilds using EAPIs 0, 1, and 2, and it appeared to work fine. It
> already happened to have a function called src_configure, so that
> doesn't appear in the patch.
>
> One thing I see as an improvement is a lack of EAPI value checks
> throughout the ebuild to avoid repetition between the function export
> and the function call. Things just check whether a function was
> exported, which is the only place where EAPI value checks happen.
>
> Additionally, the fallback in case statements is "I don't know what to
> do" and supported EAPIs are explicitly defined. This will make it
> obvious when the eclass doesn't support a new EAPI instead of it
> randomly failing after you try it.
>
> Any thoughts?
>
>

The other option instead of die would be DEPEND="THIS-IS-NOT-VALID".

Regards,
Petteri
 
Old 03-07-2009, 06:58 AM
Rmi Cardona
 
Default x-modular.eclass: A modified approach to EAPI support

Le 06/03/2009 21:57, Donnie Berkholz a crit :

Any thoughts?


Looks pretty good to me. I don't have much else to say

Cheers,

Rmi
 
Old 03-07-2009, 08:50 AM
Ulrich Mueller
 
Default x-modular.eclass: A modified approach to EAPI support

>>>>> On Fri, 06 Mar 2009, Donnie Berkholz wrote:

> Any thoughts?

> + *)
> + die "Unknown EAPI ${EAPI}"
> + ;;

Is is safe to assume that an unknown EAPI will provide a "die"
function?

Ulrich
 
Old 03-08-2009, 09:38 AM
David Leverton
 
Default x-modular.eclass: A modified approach to EAPI support

On Sunday 08 March 2009 05:22:03 Donnie Berkholz wrote:
> FYI, using EXPORT_FUNCTIONS before inherit, as this patch caused
> x-modular.eclass to do, is broken in current portage releases. Zac said
> he would change this to be consistent with the lack of any ordering
> restriction in the PMS. Thanks to Tomáš Chvátal for tracking down this
> tricky bug!

Better to ask for PMS to be clarified. All existing package managers do
EXPORT_FUNCTIONS in more or less the same way, so changing it shouldn't
happen without an EAPI bump.
 
Old 03-08-2009, 09:38 PM
Zac Medico
 
Default x-modular.eclass: A modified approach to EAPI support

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Leverton wrote:
> On Sunday 08 March 2009 05:22:03 Donnie Berkholz wrote:
>> FYI, using EXPORT_FUNCTIONS before inherit, as this patch caused
>> x-modular.eclass to do, is broken in current portage releases. Zac said
>> he would change this to be consistent with the lack of any ordering
>> restriction in the PMS. Thanks to Tomáš Chvátal for tracking down this
>> tricky bug!
>
> Better to ask for PMS to be clarified. All existing package managers do
> EXPORT_FUNCTIONS in more or less the same way, so changing it shouldn't
> happen without an EAPI bump.

As discussed on irc, if we make it conditional on EAPI then you'll
practically never be able to call EXPORT_FUNCTIONS before inherit
since eclasses generally support multiple EAPIs. So, I've added a
warning message that is triggered when EXPORT_FUNCTIONS is called
before inherit. In a year or two we can consider having the warning
removed.
- --
Thanks,
Zac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAkm0SPsACgkQ/ejvha5XGaN/+ACgsS44TWTR2fODGzwSI0XH5xN7
xpkAoOJhSWeXQDnhO8OuoXuViB2MNe7F
=RJI6
-----END PGP SIGNATURE-----
 

Thread Tools




All times are GMT. The time now is 11:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org