Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Fri, 09 Mar 2012 16:15:58
Message-Id: 4F5A2C8F.8020206@gentoo.org
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Ian Stakenvicius
1 On 03/09/2012 07:52 AM, Ian Stakenvicius wrote:
2 > On 09/03/12 10:41 AM, Zac Medico wrote:
3 >> On 03/09/2012 07:21 AM, Michael Orlitzky wrote:
4 >>> The advantage that the eapi function has over a comment is that
5 >>> it's not magic -- it's just normal bash syntax. So we've
6 >>> addressed that issue at a small performance cost (we're really
7 >>> only sourcing the ebuild up to 'exit').
8 >
9 >> Also consider the case where a user syncs after not having updated
10 >> for a couple of months, and the tree contains some ebuilds with
11 >> EAPIs that are not supported by the currently installed package
12 >> manager.
13 >
14 >
15 > IIRC we get this already, when the EAPI isn't supported by the version
16 > of portage installed -- upgrading really old systems won't allow an
17 > emerge of python-2.7 due to a too-new EAPI, and python-2.7 is needed
18 > to upgrade to the newer portage.
19
20 You're talking about a very specific (unfortunate) upgrade path
21 breakage. We should keep the discussion focused on more generic cases
22 that apply to future upgrade scenarios, rather than focusing on past
23 breakages (though it's obvious that we should also try to avoid such
24 upgrade path breakages in the future).
25
26 Assuming that there is still a viable upgrade path, the package manager
27 needs resolve dependencies and filter ebuilds based on whether or not
28 their EAPI is supported. There are basically two ways to do the EAPI
29 filtering:
30
31 1) Access the EAPI from the metadata cache. This assumes that the
32 package manager is able to validate metadata cache entries for EAPIs
33 that it does not support, which is a somewhat fragile assumption given
34 the complexities of cache validation, which involves verification of
35 ebuilds and additional sources of metadata which may include eclasses
36 and possibly other files in the future.
37
38 2) Parse the ebuild from the ebuild using a pre-defined protocol (parse
39 EAPI assignment, parse comment, or parse file name as in GLEP 55...).
40
41 > I don't see how the EAPI check itself failing and thereby excluding an
42 > ebuild is much different than the specified EAPI excluding it..?
43 > Either way, the end user is going to have issues if they don't keep
44 > their portage up to date.
45
46 They may or may not have issues. Our goal is to minimize our
47 vulnerability to these kinds of issues as much as possible. Being able
48 to obtain the ebuild EAPI without the expense of sourcing it is one
49 small step toward this goal.
50 --
51 Thanks,
52 Zac

Replies

Subject Author
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Eray Aslan <eras@g.o>