1 |
Author: grobian |
2 |
Date: 2009-03-27 11:43:55 +0000 (Fri, 27 Mar 2009) |
3 |
New Revision: 13234 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/configure.in |
7 |
main/branches/prefix/pym/_emerge/__init__.py |
8 |
main/branches/prefix/pym/portage/__init__.py |
9 |
main/branches/prefix/pym/portage/const.py |
10 |
main/branches/prefix/pym/portage/const_autotool.py |
11 |
main/branches/prefix/pym/portage/dbapi/bintree.py |
12 |
Log: |
13 |
Remove EAPIPREFIX, remain backwards compatible for now by still accepting 'prefix' in EAPI, but not caring about it much. Prefix masking is done solely by our (for this reason) different keywords |
14 |
|
15 |
Modified: main/branches/prefix/configure.in |
16 |
=================================================================== |
17 |
--- main/branches/prefix/configure.in 2009-03-27 09:40:37 UTC (rev 13233) |
18 |
+++ main/branches/prefix/configure.in 2009-03-27 11:43:55 UTC (rev 13234) |
19 |
@@ -208,10 +208,8 @@ |
20 |
if test "x$DOMAIN_PREFIX" = "x" |
21 |
then |
22 |
PORTAGE_EPREFIX='""' |
23 |
- EAPIPREFIX='None' |
24 |
else |
25 |
PORTAGE_EPREFIX='path.normpath("'"$DOMAIN_PREFIX"'")' |
26 |
- EAPIPREFIX='"prefix"' |
27 |
fi |
28 |
|
29 |
DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin" |
30 |
@@ -236,7 +234,6 @@ |
31 |
AC_SUBST(rootgid) |
32 |
AC_SUBST(DOMAIN_PREFIX) |
33 |
AC_SUBST(PORTAGE_EPREFIX) |
34 |
-AC_SUBST(EAPIPREFIX) |
35 |
AC_SUBST(DEFAULT_PATH) |
36 |
AC_SUBST(PORTAGE_BASE,['${exec_prefix}/lib/portage']) |
37 |
AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue) |
38 |
|
39 |
Modified: main/branches/prefix/pym/_emerge/__init__.py |
40 |
=================================================================== |
41 |
--- main/branches/prefix/pym/_emerge/__init__.py 2009-03-27 09:40:37 UTC (rev 13233) |
42 |
+++ main/branches/prefix/pym/_emerge/__init__.py 2009-03-27 11:43:55 UTC (rev 13234) |
43 |
@@ -63,7 +63,7 @@ |
44 |
import portage.util |
45 |
import portage.locks |
46 |
import portage.exception |
47 |
-from portage.const import EPREFIX, BPREFIX, EPREFIX_LSTRIP, EAPIPREFIX |
48 |
+from portage.const import EPREFIX, BPREFIX, EPREFIX_LSTRIP |
49 |
from portage.data import secpass |
50 |
from portage.elog.messages import eerror |
51 |
from portage.util import normalize_path as normpath |
52 |
@@ -3032,7 +3032,7 @@ |
53 |
|
54 |
pkg = self.pkg |
55 |
phases = self._phases |
56 |
- eapi = pkg.metadata["EAPI"].replace(EAPIPREFIX, "").strip() |
57 |
+ eapi = pkg.metadata["EAPI"].replace("prefix", "").strip() |
58 |
if eapi in ("0", "1"): |
59 |
# skip src_prepare and src_configure |
60 |
phases = phases[2:] |
61 |
@@ -6090,15 +6090,10 @@ |
62 |
print "!!! One of the following masked packages is required to complete your request:" |
63 |
have_eapi_mask = show_masked_packages(masked_packages) |
64 |
if have_eapi_mask: |
65 |
- if portage.const.EAPIPREFIX: |
66 |
- p = portage.const.EAPIPREFIX + " " |
67 |
- else: |
68 |
- p = '' |
69 |
- print |
70 |
msg = ("The current version of portage supports " + \ |
71 |
- "EAPI '%s%s'. You must upgrade to a newer version" + \ |
72 |
+ "EAPI '%s'. You must upgrade to a newer version" + \ |
73 |
" of portage before EAPI masked packages can" + \ |
74 |
- " be installed.") % (p, portage.const.EAPI) |
75 |
+ " be installed.") % (portage.const.EAPI) |
76 |
from textwrap import wrap |
77 |
for line in wrap(msg, 75): |
78 |
print line |
79 |
|
80 |
Modified: main/branches/prefix/pym/portage/__init__.py |
81 |
=================================================================== |
82 |
--- main/branches/prefix/pym/portage/__init__.py 2009-03-27 09:40:37 UTC (rev 13233) |
83 |
+++ main/branches/prefix/pym/portage/__init__.py 2009-03-27 11:43:55 UTC (rev 13234) |
84 |
@@ -5062,21 +5062,11 @@ |
85 |
# However, back to reality, we just look for all <desc> we require, |
86 |
# and don't do version tricks other than the main tree does. |
87 |
|
88 |
- eapi = str(eapi).split() # note Python's contact for this special case |
89 |
+ eapi = str(eapi).split() # note Python's contract for this special case |
90 |
|
91 |
- # these are the properties that MUST be present (should) |
92 |
- properties = set() |
93 |
- if portage.const.EAPIPREFIX: |
94 |
- properties.add(portage.const.EAPIPREFIX) # clumpsy temporary solution |
95 |
- |
96 |
- for prop in properties: |
97 |
- if prop not in eapi: |
98 |
- return False |
99 |
- else: |
100 |
- eapi.remove(prop) |
101 |
- |
102 |
- # now check if what's left is supported (can) |
103 |
+ # check what's supported (can) |
104 |
properties = set(_testing_eapis) # another clumpsy solution |
105 |
+ properties.add("prefix") # clumpsy temporary solution |
106 |
for i in range(portage.const.EAPI + 1): |
107 |
properties.add(str(i)) |
108 |
|
109 |
|
110 |
Modified: main/branches/prefix/pym/portage/const.py |
111 |
=================================================================== |
112 |
--- main/branches/prefix/pym/portage/const.py 2009-03-27 09:40:37 UTC (rev 13233) |
113 |
+++ main/branches/prefix/pym/portage/const.py 2009-03-27 11:43:55 UTC (rev 13234) |
114 |
@@ -14,8 +14,6 @@ |
115 |
# pick up EPREFIX from the environment if set |
116 |
if "EPREFIX" in os.environ: |
117 |
EPREFIX = os.path.normpath(os.environ["EPREFIX"]) |
118 |
-if "EAPIPREFIX" in os.environ: |
119 |
- EAPIPREFIX = os.environ["EAPIPREFIX"] |
120 |
|
121 |
# =========================================================================== |
122 |
# START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF |
123 |
|
124 |
Modified: main/branches/prefix/pym/portage/const_autotool.py |
125 |
=================================================================== |
126 |
--- main/branches/prefix/pym/portage/const_autotool.py 2009-03-27 09:40:37 UTC (rev 13233) |
127 |
+++ main/branches/prefix/pym/portage/const_autotool.py 2009-03-27 11:43:55 UTC (rev 13234) |
128 |
@@ -1,15 +1,14 @@ |
129 |
-# Copyright: 2005-2007 Gentoo Foundation |
130 |
+# Copyright: 2005-2009 Gentoo Foundation |
131 |
# Distributed under the terms of the GNU General Public License v2 |
132 |
# $Id$ |
133 |
|
134 |
# all vars that are to wind up in portage_const must have their name listed in __all__ |
135 |
|
136 |
-__all__ = ["EAPIPREFIX", "EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE", |
137 |
+__all__ = ["EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE", |
138 |
"portageuser", "portagegroup", "rootuser", "rootuid", "rootgid"] |
139 |
|
140 |
from os import path |
141 |
|
142 |
-EAPIPREFIX = @EAPIPREFIX@ |
143 |
EPREFIX = @PORTAGE_EPREFIX@ |
144 |
SYSCONFDIR = path.normpath("@sysconfdir@") |
145 |
DATADIR = path.normpath("@datadir@") |
146 |
|
147 |
Modified: main/branches/prefix/pym/portage/dbapi/bintree.py |
148 |
=================================================================== |
149 |
--- main/branches/prefix/pym/portage/dbapi/bintree.py 2009-03-27 09:40:37 UTC (rev 13233) |
150 |
+++ main/branches/prefix/pym/portage/dbapi/bintree.py 2009-03-27 11:43:55 UTC (rev 13234) |
151 |
@@ -17,7 +17,7 @@ |
152 |
from portage.dbapi.virtual import fakedbapi |
153 |
from portage.exception import InvalidPackageName, \ |
154 |
PermissionDenied, PortageException |
155 |
-from portage.const import EAPI, EAPIPREFIX |
156 |
+from portage.const import EAPI |
157 |
|
158 |
from portage import dep_expand, listdir, _check_distfile, _movefile |
159 |
|
160 |
@@ -170,13 +170,9 @@ |
161 |
self._pkgindex_header_keys = set(["ACCEPT_KEYWORDS", "CBUILD", |
162 |
"CHOST", "CONFIG_PROTECT", "CONFIG_PROTECT_MASK", "FEATURES", |
163 |
"GENTOO_MIRRORS", "INSTALL_MASK", "SYNC", "USE", "EAPI", "EPREFIX"]) |
164 |
- if EAPIPREFIX: |
165 |
- eapi = EAPIPREFIX + " " + str(EAPI) |
166 |
- else: |
167 |
- eapi = str(EAPI) |
168 |
self._pkgindex_default_pkg_data = { |
169 |
"DEPEND" : "", |
170 |
- "EAPI" : eapi, |
171 |
+ "EAPI" : "0", |
172 |
"IUSE" : "", |
173 |
"KEYWORDS": "", |
174 |
"LICENSE" : "", |