1 |
Author: grobian |
2 |
Date: 2008-09-28 11:08:30 +0000 (Sun, 28 Sep 2008) |
3 |
New Revision: 11578 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/NEWS |
7 |
main/branches/prefix/pym/_emerge/__init__.py |
8 |
main/branches/prefix/pym/portage/__init__.py |
9 |
main/branches/prefix/pym/portage/dbapi/porttree.py |
10 |
Log: |
11 |
Merged from trunk -r11572:11576 |
12 |
|
13 |
| 11573 | Mask packages with deprecated EAPIs in order to prevent them | |
14 |
| zmedico | from being installed. Such packages will still behave | |
15 |
| | normally if they are already installed, but preventing new | |
16 |
| | installation will remind people to update the EAPIs in their | |
17 |
| | overlays if necessary. | |
18 |
|
19 |
| 11574 | EAPI 2 is now supported. | |
20 |
| zmedico | | |
21 |
|
22 |
| 11575 | Fix code inside BlockerDB.findInstalledBlockers() to | |
23 |
| zmedico | correctly strip multiple "!" characters when necessary. The | |
24 |
| | code seemed to work fine anyway so this is more a | |
25 |
| | correctness fix than a bug fix. | |
26 |
|
27 |
| 11576 | Another correctness fix in | |
28 |
| zmedico | BlockerDB.findInstalledBlockers(). | |
29 |
|
30 |
|
31 |
Modified: main/branches/prefix/NEWS |
32 |
=================================================================== |
33 |
--- main/branches/prefix/NEWS 2008-09-28 10:54:48 UTC (rev 11577) |
34 |
+++ main/branches/prefix/NEWS 2008-09-28 11:08:30 UTC (rev 11578) |
35 |
@@ -3,11 +3,9 @@ |
36 |
portage-2.2 |
37 |
------------- |
38 |
|
39 |
-* Add support for a new EAPI="2_pre0" value that can be used in ebuilds when |
40 |
- testing new features such as USE dependencies. This is an experimental EAPI |
41 |
- that will not be supported after the final EAPI 2 is defined. For more |
42 |
- information about experimental EAPI features, refer to the "Ebuild" chapter |
43 |
- of the html documentation that is installed with portage. |
44 |
+* Add support for a new EAPI="2" value. For more information about new EAPI |
45 |
+ features, refer to the "Ebuild" chapter of the html documentation that is |
46 |
+ installed with portage. |
47 |
* Add PORTAGE_IONICE_COMMAND setting for make.conf which is called to adjust |
48 |
IO priority on portage and it's subprocesses. |
49 |
* Add link level dependency awareness to emerge --depclean and --prune actions |
50 |
|
51 |
Modified: main/branches/prefix/pym/_emerge/__init__.py |
52 |
=================================================================== |
53 |
--- main/branches/prefix/pym/_emerge/__init__.py 2008-09-28 10:54:48 UTC (rev 11577) |
54 |
+++ main/branches/prefix/pym/_emerge/__init__.py 2008-09-28 11:08:30 UTC (rev 11578) |
55 |
@@ -1266,11 +1266,14 @@ |
56 |
return False |
57 |
if len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]): |
58 |
return False |
59 |
- if not portage.eapi_is_supported(pkg.metadata["EAPI"]): |
60 |
+ eapi = pkg.metadata["EAPI"] |
61 |
+ if not portage.eapi_is_supported(eapi): |
62 |
return False |
63 |
- if not pkg.installed and \ |
64 |
- pkgsettings._getMissingKeywords(pkg.cpv, pkg.metadata): |
65 |
- return False |
66 |
+ if not pkg.installed: |
67 |
+ if portage._eapi_is_deprecated(eapi): |
68 |
+ return False |
69 |
+ if pkgsettings._getMissingKeywords(pkg.cpv, pkg.metadata): |
70 |
+ return False |
71 |
if pkgsettings._getMaskAtom(pkg.cpv, pkg.metadata): |
72 |
return False |
73 |
if pkgsettings._getProfileMaskAtom(pkg.cpv, pkg.metadata): |
74 |
@@ -3886,7 +3889,7 @@ |
75 |
blocker_atoms = [] |
76 |
for pkg in installed_pkgs: |
77 |
for blocker_atom in blocker_cache[pkg.cpv].atoms: |
78 |
- blocker_atom = blocker_atom[1:] |
79 |
+ blocker_atom = blocker_atom.lstrip("!") |
80 |
blocker_atoms.append(blocker_atom) |
81 |
blocker_parents.add(blocker_atom, pkg) |
82 |
|
83 |
@@ -3909,8 +3912,8 @@ |
84 |
show_invalid_depstring_notice(new_pkg, depstr, atoms) |
85 |
assert False |
86 |
|
87 |
- blocker_atoms = [atom[1:] for atom in atoms \ |
88 |
- if atom.startswith("!")] |
89 |
+ blocker_atoms = [atom.lstrip("!") for atom in atoms \ |
90 |
+ if atom[:1] == "!"] |
91 |
if blocker_atoms: |
92 |
blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms) |
93 |
for inst_pkg in installed_pkgs: |
94 |
|
95 |
Modified: main/branches/prefix/pym/portage/__init__.py |
96 |
=================================================================== |
97 |
--- main/branches/prefix/pym/portage/__init__.py 2008-09-28 10:54:48 UTC (rev 11577) |
98 |
+++ main/branches/prefix/pym/portage/__init__.py 2008-09-28 11:08:30 UTC (rev 11578) |
99 |
@@ -4598,6 +4598,11 @@ |
100 |
eerror(l, phase=mydo, key=mysettings.mycpv) |
101 |
return rval |
102 |
|
103 |
+_deprecated_eapis = frozenset(["2_pre3", "2_pre2", "2_pre1"]) |
104 |
+ |
105 |
+def _eapi_is_deprecated(eapi): |
106 |
+ return eapi in _deprecated_eapis |
107 |
+ |
108 |
def eapi_is_supported(eapi): |
109 |
# PREFIX HACK/EXTENSION: in prefix we have "incompatible" ebuilds in |
110 |
# an consistent manner; regardless what the EAPI of the main tree |
111 |
@@ -4627,7 +4632,7 @@ |
112 |
eapi.remove(prop) |
113 |
|
114 |
# now check if what's left is supported (can) |
115 |
- properties = [ "2_pre3", "2_pre2", "2_pre1" ] # another clumpsy solution |
116 |
+ properties = _deprecated_eapis[:] # another clumpsy solution |
117 |
for i in range(portage.const.EAPI + 1): |
118 |
properties.append(str(i)) |
119 |
|
120 |
@@ -6806,6 +6811,8 @@ |
121 |
eapi = eapi[1:] |
122 |
if not eapi_is_supported(eapi): |
123 |
return ["EAPI %s" % eapi] |
124 |
+ elif _eapi_is_deprecated(eapi) and not installed: |
125 |
+ return ["EAPI %s" % eapi] |
126 |
egroups = settings.configdict["backupenv"].get( |
127 |
"ACCEPT_KEYWORDS", "").split() |
128 |
mygroups = mygroups.split() |
129 |
|
130 |
Modified: main/branches/prefix/pym/portage/dbapi/porttree.py |
131 |
=================================================================== |
132 |
--- main/branches/prefix/pym/portage/dbapi/porttree.py 2008-09-28 10:54:48 UTC (rev 11577) |
133 |
+++ main/branches/prefix/pym/portage/dbapi/porttree.py 2008-09-28 11:08:30 UTC (rev 11578) |
134 |
@@ -20,7 +20,8 @@ |
135 |
import portage.gpg, portage.checksum |
136 |
|
137 |
from portage import eclass_cache, auxdbkeys, doebuild, flatten, \ |
138 |
- listdir, dep_expand, eapi_is_supported, key_expand, dep_check |
139 |
+ listdir, dep_expand, eapi_is_supported, key_expand, dep_check, \ |
140 |
+ _eapi_is_deprecated |
141 |
|
142 |
import os, stat |
143 |
from itertools import izip |
144 |
@@ -917,8 +918,11 @@ |
145 |
writemsg("!!! %s\n" % str(e), noiselevel=-1) |
146 |
del e |
147 |
continue |
148 |
- if not eapi_is_supported(metadata["EAPI"]): |
149 |
+ eapi = metadata["EAPI"] |
150 |
+ if not eapi_is_supported(eapi): |
151 |
continue |
152 |
+ if _eapi_is_deprecated(eapi): |
153 |
+ continue |
154 |
if self.mysettings._getMissingKeywords(mycpv, metadata): |
155 |
continue |
156 |
if local_config: |