1 |
On Mon, Aug 29, 2005 at 01:52:50PM -0700, Zac Medico wrote: |
2 |
> Brian Harring wrote: |
3 |
> > |
4 |
> >Please test this out; if you want to test the EAPI checking, tag |
5 |
> >EAPI=1 into an ebuild, and try making emerge bail. |
6 |
> > |
7 |
> |
8 |
> Well, it bails too often. :) |
9 |
Mainly cause I generated something of a crap patch leaving a bit of |
10 |
stuff out from the looks of it :) |
11 |
|
12 |
> It seems that an explicit integer conversion is needed for > and < |
13 |
> comparisons with mixed types |
14 |
> (2.0.51-eapi-awareness-emerge-int-conversion.patch). |
15 |
> >If you're less adventurous, please test the compatibility cache |
16 |
> >testing; |
17 |
> >in /etc/portage/modules |
18 |
> >portdbapi.metadbmodule=portage_db_metadata.database |
19 |
> > |
20 |
> |
21 |
> We need to make sure EAPI defaults to 0 when using old metadata. It seems |
22 |
> like db_template.__getitem__() is a nice central place to do that |
23 |
> (2.0.51-eapi-awareness-db_template.patch). I made another patch for |
24 |
> bindbapi.aux_get() which does the same for old metadata from binpkgs |
25 |
> (2.0.51-eapi-awareness-bindbapi.aux_get.patch). |
26 |
The default'ing should occur outside of the cache layer imo, due to |
27 |
the fact it has to occur in every dbapi. |
28 |
Attached is a patch doing so, using gvisible to mask ebuild's EAPI > |
29 |
portage's EAPI, and a check in doebuild to block people from trying to |
30 |
do things with an ebuild that has an EAPI greater then portage's. |
31 |
|
32 |
The doebuild mod is strictly for non depend phases; the data from a |
33 |
depend's phase gets nuked and EAPI set to -EAPI if it's a later |
34 |
version that what portage knows about. |
35 |
|
36 |
Discussed on irc a bit, but repeating the reasons for those on the ml |
37 |
who've missed the logic; effectively, an EAPI=0 portage generating an |
38 |
EAPI=1 cache entry cannot be guranteed to generate it correctly, |
39 |
contain all needed metadata. |
40 |
|
41 |
So you flag it specially (negated EAPI), and don't store anything. |
42 |
Add a few checks in so when an EAPI=1 portage finds the EAPI=1 cache |
43 |
entry, which has been negated to mean effectively "someone who is |
44 |
EAPI=1, please regenerate me", it gets regenerated, and the entry can |
45 |
be trusted to hold all required EAPI1 metadata. |
46 |
|
47 |
Attached is a patch culminating the feedback, with a few tweaks. |
48 |
Should work a helluva lot better this time around :) |
49 |
~harring |