1 |
Remove the support for PROVIDE metadata. The aux entry that used to |
2 |
be assigned to this variable is now reused in the PMS, so we finally |
3 |
need to clean up. |
4 |
--- |
5 |
bin/ebuild.sh | 2 +- |
6 |
bin/phase-functions.sh | 2 +- |
7 |
man/ebuild.5 | 10 ----- |
8 |
pym/_emerge/Package.py | 27 ++---------- |
9 |
pym/portage/__init__.py | 2 +- |
10 |
pym/portage/_sets/base.py | 17 +------- |
11 |
pym/portage/cache/metadata.py | 4 +- |
12 |
pym/portage/dbapi/__init__.py | 4 +- |
13 |
pym/portage/dbapi/bintree.py | 9 ++-- |
14 |
pym/portage/dbapi/dep_expand.py | 2 +- |
15 |
pym/portage/dbapi/porttree.py | 4 +- |
16 |
pym/portage/dbapi/vartree.py | 38 ++-------------- |
17 |
pym/portage/dep/__init__.py | 20 +-------- |
18 |
pym/portage/emaint/modules/move/move.py | 4 +- |
19 |
pym/portage/package/ebuild/_config/MaskManager.py | 10 ++--- |
20 |
.../package/ebuild/_config/special_env_vars.py | 4 +- |
21 |
pym/portage/package/ebuild/config.py | 43 +++--------------- |
22 |
pym/portage/package/ebuild/doebuild.py | 2 +- |
23 |
pym/portage/repository/config.py | 5 +-- |
24 |
.../tests/resolver/test_virtual_transition.py | 51 ---------------------- |
25 |
repoman/man/repoman.1 | 7 --- |
26 |
.../repoman/modules/scan/depend/_depend_checks.py | 2 +- |
27 |
.../modules/scan/metadata/ebuild_metadata.py | 8 +--- |
28 |
repoman/pym/repoman/qa_data.py | 2 - |
29 |
repoman/pym/repoman/repos.py | 3 -- |
30 |
25 files changed, 43 insertions(+), 239 deletions(-) |
31 |
delete mode 100644 pym/portage/tests/resolver/test_virtual_transition.py |
32 |
|
33 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
34 |
index 67d255f78..9995a2f99 100755 |
35 |
--- a/bin/ebuild.sh |
36 |
+++ b/bin/ebuild.sh |
37 |
@@ -728,7 +728,7 @@ if [[ $EBUILD_PHASE = depend ]] ; then |
38 |
fi |
39 |
|
40 |
auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE |
41 |
- DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND PROVIDE EAPI |
42 |
+ DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND UNUSED_05 EAPI |
43 |
PROPERTIES DEFINED_PHASES HDEPEND UNUSED_04 |
44 |
UNUSED_03 UNUSED_02 UNUSED_01" |
45 |
|
46 |
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh |
47 |
index 017dc132b..0ceddb451 100644 |
48 |
--- a/bin/phase-functions.sh |
49 |
+++ b/bin/phase-functions.sh |
50 |
@@ -9,7 +9,7 @@ |
51 |
|
52 |
PORTAGE_READONLY_METADATA="DEFINED_PHASES DEPEND DESCRIPTION |
53 |
EAPI HDEPEND HOMEPAGE INHERITED IUSE REQUIRED_USE KEYWORDS LICENSE |
54 |
- PDEPEND PROVIDE RDEPEND REPOSITORY RESTRICT SLOT SRC_URI" |
55 |
+ PDEPEND RDEPEND REPOSITORY RESTRICT SLOT SRC_URI" |
56 |
|
57 |
PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \ |
58 |
EBUILD_SH_ARGS EMERGE_FROM FILESDIR MERGE_TYPE \ |
59 |
diff --git a/man/ebuild.5 b/man/ebuild.5 |
60 |
index 71e754d48..eb27d43bb 100644 |
61 |
--- a/man/ebuild.5 |
62 |
+++ b/man/ebuild.5 |
63 |
@@ -726,16 +726,6 @@ A space delimited list of properties, with conditional syntax support. |
64 |
One or more ebuild phases will produce a prompt that requires user interaction. |
65 |
.RE |
66 |
.PD 1 |
67 |
-.TP |
68 |
-.B PROVIDE\fR = \fI"virtual/TARGET" |
69 |
-This variable should only be used when a package provides a virtual target. |
70 |
-For example, blackdown\-jdk and sun\-jdk provide \fIvirtual/jdk\fR. This |
71 |
-allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown |
72 |
-or sun specifically. |
73 |
- |
74 |
-The \fBPROVIDE\fR variable has been deprecated. See |
75 |
-\fIhttps://www.gentoo.org/glep/glep-0037.html\fR for details. |
76 |
- |
77 |
.TP |
78 |
.B DOCS |
79 |
Beginning with \fBEAPI 4\fR, an array or space\-delimited list of documentation |
80 |
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py |
81 |
index cebfd8281..b7911c5f4 100644 |
82 |
--- a/pym/_emerge/Package.py |
83 |
+++ b/pym/_emerge/Package.py |
84 |
@@ -1,4 +1,4 @@ |
85 |
-# Copyright 1999-2014 Gentoo Foundation |
86 |
+# Copyright 1999-2018 Gentoo Foundation |
87 |
# Distributed under the terms of the GNU General Public License v2 |
88 |
|
89 |
from __future__ import unicode_literals |
90 |
@@ -44,7 +44,7 @@ class Package(Task): |
91 |
metadata_keys = [ |
92 |
"BUILD_ID", "BUILD_TIME", "CHOST", "COUNTER", "DEFINED_PHASES", |
93 |
"DEPEND", "EAPI", "HDEPEND", "INHERITED", "IUSE", "KEYWORDS", |
94 |
- "LICENSE", "MD5", "PDEPEND", "PROVIDE", "PROVIDES", |
95 |
+ "LICENSE", "MD5", "PDEPEND", "PROVIDES", |
96 |
"RDEPEND", "repository", "REQUIRED_USE", |
97 |
"PROPERTIES", "REQUIRES", "RESTRICT", "SIZE", |
98 |
"SLOT", "USE", "_mtime_"] |
99 |
@@ -165,17 +165,7 @@ class Package(Task): |
100 |
|
101 |
@property |
102 |
def provided_cps(self): |
103 |
- |
104 |
- if self._provided_cps is None: |
105 |
- provided_cps = [self.cp] |
106 |
- for atom in self._metadata["PROVIDE"].split(): |
107 |
- try: |
108 |
- provided_cps.append(Atom(atom).cp) |
109 |
- except InvalidAtom: |
110 |
- pass |
111 |
- self._provided_cps = tuple(provided_cps) |
112 |
- |
113 |
- return self._provided_cps |
114 |
+ return (self.cp,) |
115 |
|
116 |
@property |
117 |
def restrict(self): |
118 |
@@ -324,15 +314,6 @@ class Package(Task): |
119 |
self._validated_atoms = tuple(set(atom for atom in |
120 |
validated_atoms if isinstance(atom, Atom))) |
121 |
|
122 |
- k = 'PROVIDE' |
123 |
- v = self._metadata.get(k) |
124 |
- if v: |
125 |
- try: |
126 |
- use_reduce(v, eapi=dep_eapi, matchall=True, |
127 |
- is_valid_flag=dep_valid_flag, token_class=Atom) |
128 |
- except InvalidDependString as e: |
129 |
- self._invalid_metadata("PROVIDE.syntax", "%s: %s" % (k, e)) |
130 |
- |
131 |
for k in self._use_conditional_misc_keys: |
132 |
v = self._metadata.get(k) |
133 |
if not v: |
134 |
@@ -873,7 +854,7 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase): |
135 |
_wrapped_keys = frozenset( |
136 |
["COUNTER", "INHERITED", "USE", "_mtime_"]) |
137 |
_use_conditional_keys = frozenset( |
138 |
- ['LICENSE', 'PROPERTIES', 'PROVIDE', 'RESTRICT',]) |
139 |
+ ['LICENSE', 'PROPERTIES', 'RESTRICT',]) |
140 |
|
141 |
def __init__(self, pkg, metadata): |
142 |
_PackageMetadataWrapperBase.__init__(self) |
143 |
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py |
144 |
index 69658b432..8596b89b1 100644 |
145 |
--- a/pym/portage/__init__.py |
146 |
+++ b/pym/portage/__init__.py |
147 |
@@ -508,7 +508,7 @@ auxdbkeys = ( |
148 |
'DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI', |
149 |
'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION', |
150 |
'KEYWORDS', 'INHERITED', 'IUSE', 'REQUIRED_USE', |
151 |
- 'PDEPEND', 'PROVIDE', 'EAPI', |
152 |
+ 'PDEPEND', 'UNUSED_05', 'EAPI', |
153 |
'PROPERTIES', 'DEFINED_PHASES', 'HDEPEND', 'UNUSED_04', |
154 |
'UNUSED_03', 'UNUSED_02', 'UNUSED_01', |
155 |
) |
156 |
diff --git a/pym/portage/_sets/base.py b/pym/portage/_sets/base.py |
157 |
index ee20d3671..aba295602 100644 |
158 |
--- a/pym/portage/_sets/base.py |
159 |
+++ b/pym/portage/_sets/base.py |
160 |
@@ -1,4 +1,4 @@ |
161 |
-# Copyright 2007-2014 Gentoo Foundation |
162 |
+# Copyright 2007-2018 Gentoo Foundation |
163 |
# Distributed under the terms of the GNU General Public License v2 |
164 |
|
165 |
import sys |
166 |
@@ -157,21 +157,6 @@ class PackageSet(object): |
167 |
for atom in atoms: |
168 |
if match_from_list(atom, cpv_slot_list): |
169 |
yield atom |
170 |
- provides = pkg._metadata['PROVIDE'] |
171 |
- if not provides: |
172 |
- return |
173 |
- provides = provides.split() |
174 |
- for provide in provides: |
175 |
- try: |
176 |
- provided_cp = Atom(provide).cp |
177 |
- except InvalidAtom: |
178 |
- continue |
179 |
- atoms = self._atommap.get(provided_cp) |
180 |
- if atoms: |
181 |
- for atom in atoms: |
182 |
- if match_from_list(atom.replace(provided_cp, cp), |
183 |
- cpv_slot_list): |
184 |
- yield atom |
185 |
|
186 |
class EditablePackageSet(PackageSet): |
187 |
|
188 |
diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py |
189 |
index 0c588bde9..12639c6a1 100644 |
190 |
--- a/pym/portage/cache/metadata.py |
191 |
+++ b/pym/portage/cache/metadata.py |
192 |
@@ -1,4 +1,4 @@ |
193 |
-# Copyright 2005-2014 Gentoo Foundation |
194 |
+# Copyright 2005-2018 Gentoo Foundation |
195 |
# Author(s): Brian Harring (ferringb@g.o) |
196 |
# License: GPL2 |
197 |
|
198 |
@@ -29,7 +29,7 @@ class database(flat_hash.database): |
199 |
auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI', |
200 |
'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION', |
201 |
'KEYWORDS', 'INHERITED', 'IUSE', 'REQUIRED_USE', |
202 |
- 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES', |
203 |
+ 'PDEPEND', 'UNUSED', 'EAPI', 'PROPERTIES', |
204 |
'DEFINED_PHASES', 'HDEPEND') |
205 |
|
206 |
autocommits = True |
207 |
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py |
208 |
index 2574b63df..c1b5d967d 100644 |
209 |
--- a/pym/portage/dbapi/__init__.py |
210 |
+++ b/pym/portage/dbapi/__init__.py |
211 |
@@ -1,4 +1,4 @@ |
212 |
-# Copyright 1998-2014 Gentoo Foundation |
213 |
+# Copyright 1998-2018 Gentoo Foundation |
214 |
# Distributed under the terms of the GNU General Public License v2 |
215 |
|
216 |
from __future__ import unicode_literals |
217 |
@@ -316,7 +316,7 @@ class dbapi(object): |
218 |
maxval = len(cpv_all) |
219 |
aux_get = self.aux_get |
220 |
aux_update = self.aux_update |
221 |
- update_keys = Package._dep_keys + ("PROVIDE",) |
222 |
+ update_keys = Package._dep_keys |
223 |
meta_keys = update_keys + self._pkg_str_aux_keys |
224 |
repo_dict = None |
225 |
if isinstance(updates, dict): |
226 |
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py |
227 |
index 201666c41..839897a41 100644 |
228 |
--- a/pym/portage/dbapi/bintree.py |
229 |
+++ b/pym/portage/dbapi/bintree.py |
230 |
@@ -1,4 +1,4 @@ |
231 |
-# Copyright 1998-2016 Gentoo Foundation |
232 |
+# Copyright 1998-2018 Gentoo Foundation |
233 |
# Distributed under the terms of the GNU General Public License v2 |
234 |
|
235 |
from __future__ import unicode_literals |
236 |
@@ -87,7 +87,7 @@ class bindbapi(fakedbapi): |
237 |
self._aux_cache_keys = set( |
238 |
["BUILD_ID", "BUILD_TIME", "CHOST", "DEFINED_PHASES", |
239 |
"DEPEND", "EAPI", "HDEPEND", "IUSE", "KEYWORDS", |
240 |
- "LICENSE", "MD5", "PDEPEND", "PROPERTIES", "PROVIDE", |
241 |
+ "LICENSE", "MD5", "PDEPEND", "PROPERTIES", |
242 |
"PROVIDES", "RDEPEND", "repository", "REQUIRES", "RESTRICT", |
243 |
"SIZE", "SLOT", "USE", "_mtime_" |
244 |
]) |
245 |
@@ -315,13 +315,13 @@ class binarytree(object): |
246 |
["BASE_URI", "BUILD_ID", "BUILD_TIME", "CHOST", |
247 |
"DEFINED_PHASES", "DEPEND", "DESCRIPTION", "EAPI", |
248 |
"HDEPEND", "IUSE", "KEYWORDS", "LICENSE", "PDEPEND", |
249 |
- "PKGINDEX_URI", "PROPERTIES", "PROVIDE", "PROVIDES", |
250 |
+ "PKGINDEX_URI", "PROPERTIES", "PROVIDES", |
251 |
"RDEPEND", "repository", "REQUIRES", "RESTRICT", |
252 |
"SIZE", "SLOT", "USE"] |
253 |
self._pkgindex_aux_keys = list(self._pkgindex_aux_keys) |
254 |
self._pkgindex_use_evaluated_keys = \ |
255 |
("DEPEND", "HDEPEND", "LICENSE", "RDEPEND", |
256 |
- "PDEPEND", "PROPERTIES", "PROVIDE", "RESTRICT") |
257 |
+ "PDEPEND", "PROPERTIES", "RESTRICT") |
258 |
self._pkgindex_header_keys = set([ |
259 |
"ACCEPT_KEYWORDS", "ACCEPT_LICENSE", |
260 |
"ACCEPT_PROPERTIES", "ACCEPT_RESTRICT", "CBUILD", |
261 |
@@ -342,7 +342,6 @@ class binarytree(object): |
262 |
"PATH" : "", |
263 |
"PDEPEND" : "", |
264 |
"PROPERTIES" : "", |
265 |
- "PROVIDE" : "", |
266 |
"PROVIDES": "", |
267 |
"RDEPEND" : "", |
268 |
"REQUIRES": "", |
269 |
diff --git a/pym/portage/dbapi/dep_expand.py b/pym/portage/dbapi/dep_expand.py |
270 |
index 3de5d8fc3..9515b7dec 100644 |
271 |
--- a/pym/portage/dbapi/dep_expand.py |
272 |
+++ b/pym/portage/dbapi/dep_expand.py |
273 |
@@ -1,4 +1,4 @@ |
274 |
-# Copyright 2010-2013 Gentoo Foundation |
275 |
+# Copyright 2010-2018 Gentoo Foundation |
276 |
# Distributed under the terms of the GNU General Public License v2 |
277 |
|
278 |
from __future__ import unicode_literals |
279 |
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py |
280 |
index f8ff4833b..1353ac666 100644 |
281 |
--- a/pym/portage/dbapi/porttree.py |
282 |
+++ b/pym/portage/dbapi/porttree.py |
283 |
@@ -1,4 +1,4 @@ |
284 |
-# Copyright 1998-2015 Gentoo Foundation |
285 |
+# Copyright 1998-2018 Gentoo Foundation |
286 |
# Distributed under the terms of the GNU General Public License v2 |
287 |
|
288 |
from __future__ import unicode_literals |
289 |
@@ -314,7 +314,7 @@ class portdbapi(dbapi): |
290 |
self._aux_cache_keys = set( |
291 |
["DEPEND", "EAPI", "HDEPEND", |
292 |
"INHERITED", "IUSE", "KEYWORDS", "LICENSE", |
293 |
- "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository", |
294 |
+ "PDEPEND", "PROPERTIES", "RDEPEND", "repository", |
295 |
"RESTRICT", "SLOT", "DEFINED_PHASES", "REQUIRED_USE"]) |
296 |
|
297 |
self._aux_cache = {} |
298 |
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
299 |
index b28b1c56c..8b1b77f7d 100644 |
300 |
--- a/pym/portage/dbapi/vartree.py |
301 |
+++ b/pym/portage/dbapi/vartree.py |
302 |
@@ -1,4 +1,4 @@ |
303 |
-# Copyright 1998-2017 Gentoo Foundation |
304 |
+# Copyright 1998-2018 Gentoo Foundation |
305 |
# Distributed under the terms of the GNU General Public License v2 |
306 |
|
307 |
from __future__ import division, unicode_literals |
308 |
@@ -179,7 +179,7 @@ class vardbapi(dbapi): |
309 |
["BUILD_TIME", "CHOST", "COUNTER", "DEPEND", "DESCRIPTION", |
310 |
"EAPI", "HDEPEND", "HOMEPAGE", |
311 |
"BUILD_ID", "IUSE", "KEYWORDS", |
312 |
- "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", |
313 |
+ "LICENSE", "PDEPEND", "PROPERTIES", "RDEPEND", |
314 |
"repository", "RESTRICT" , "SLOT", "USE", "DEFINED_PHASES", |
315 |
"PROVIDES", "REQUIRES" |
316 |
]) |
317 |
@@ -1475,40 +1475,10 @@ class vartree(object): |
318 |
return |
319 |
|
320 |
def get_provide(self, mycpv): |
321 |
- myprovides = [] |
322 |
- mylines = None |
323 |
- try: |
324 |
- mylines, myuse = self.dbapi.aux_get(mycpv, ["PROVIDE", "USE"]) |
325 |
- if mylines: |
326 |
- myuse = myuse.split() |
327 |
- mylines = use_reduce(mylines, uselist=myuse, flat=True) |
328 |
- for myprovide in mylines: |
329 |
- mys = catpkgsplit(myprovide) |
330 |
- if not mys: |
331 |
- mys = myprovide.split("/") |
332 |
- myprovides += [mys[0] + "/" + mys[1]] |
333 |
- return myprovides |
334 |
- except SystemExit as e: |
335 |
- raise |
336 |
- except Exception as e: |
337 |
- mydir = self.dbapi.getpath(mycpv) |
338 |
- writemsg(_("\nParse Error reading PROVIDE and USE in '%s'\n") % mydir, |
339 |
- noiselevel=-1) |
340 |
- if mylines: |
341 |
- writemsg(_("Possibly Invalid: '%s'\n") % str(mylines), |
342 |
- noiselevel=-1) |
343 |
- writemsg(_("Exception: %s\n\n") % str(e), noiselevel=-1) |
344 |
- return [] |
345 |
+ return [] |
346 |
|
347 |
def get_all_provides(self): |
348 |
- myprovides = {} |
349 |
- for node in self.getallcpv(): |
350 |
- for mykey in self.get_provide(node): |
351 |
- if mykey in myprovides: |
352 |
- myprovides[mykey] += [node] |
353 |
- else: |
354 |
- myprovides[mykey] = [node] |
355 |
- return myprovides |
356 |
+ return {} |
357 |
|
358 |
def dep_bestmatch(self, mydep, use_cache=1): |
359 |
"compatibility method -- all matches, not just visible ones" |
360 |
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py |
361 |
index 3d4bca08f..26595da47 100644 |
362 |
--- a/pym/portage/dep/__init__.py |
363 |
+++ b/pym/portage/dep/__init__.py |
364 |
@@ -1595,30 +1595,14 @@ class Atom(_unicode): |
365 |
|
366 |
def match(self, pkg): |
367 |
""" |
368 |
- Check if the given package instance matches this atom. This |
369 |
- includes support for virtual matches via PROVIDE metadata. |
370 |
+ Check if the given package instance matches this atom. |
371 |
|
372 |
@param pkg: a Package instance |
373 |
@type pkg: Package |
374 |
@return: True if this atom matches pkg, otherwise False |
375 |
@rtype: bool |
376 |
""" |
377 |
- if pkg.cp == self.cp: |
378 |
- return bool(match_from_list(self, [pkg])) |
379 |
- else: |
380 |
- try: |
381 |
- provided_cps = pkg.provided_cps |
382 |
- except AttributeError: |
383 |
- # Since _pkg_str instances lack PROVIDE metadata, |
384 |
- # just ignore this case (PROVIDE has been deprecated |
385 |
- # for years). |
386 |
- pass |
387 |
- else: |
388 |
- for provided_cp in provided_cps: |
389 |
- if provided_cp == self.cp: |
390 |
- return bool(match_from_list( |
391 |
- self.replace(self.cp, provided_cp, 1), [pkg])) |
392 |
- return False |
393 |
+ return bool(match_from_list(self, [pkg])) |
394 |
|
395 |
_extended_cp_re_cache = {} |
396 |
|
397 |
diff --git a/pym/portage/emaint/modules/move/move.py b/pym/portage/emaint/modules/move/move.py |
398 |
index 4e505ceee..e9a6acb6b 100644 |
399 |
--- a/pym/portage/emaint/modules/move/move.py |
400 |
+++ b/pym/portage/emaint/modules/move/move.py |
401 |
@@ -1,4 +1,4 @@ |
402 |
-# Copyright 2005-2012 Gentoo Foundation |
403 |
+# Copyright 2005-2018 Gentoo Foundation |
404 |
# Distributed under the terms of the GNU General Public License v2 |
405 |
|
406 |
import portage |
407 |
@@ -12,7 +12,7 @@ class MoveHandler(object): |
408 |
def __init__(self, tree, porttree): |
409 |
self._tree = tree |
410 |
self._portdb = porttree.dbapi |
411 |
- self._update_keys = Package._dep_keys + ("PROVIDE",) |
412 |
+ self._update_keys = Package._dep_keys |
413 |
self._master_repo = self._portdb.repositories.mainRepo() |
414 |
if self._master_repo is not None: |
415 |
self._master_repo = self._master_repo.name |
416 |
diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py |
417 |
index 44aba23bb..40cc6e0c4 100644 |
418 |
--- a/pym/portage/package/ebuild/_config/MaskManager.py |
419 |
+++ b/pym/portage/package/ebuild/_config/MaskManager.py |
420 |
@@ -1,4 +1,4 @@ |
421 |
-# Copyright 2010-2014 Gentoo Foundation |
422 |
+# Copyright 2010-2018 Gentoo Foundation |
423 |
# Distributed under the terms of the GNU General Public License v2 |
424 |
|
425 |
__all__ = ( |
426 |
@@ -182,8 +182,7 @@ class MaskManager(object): |
427 |
def _getMaskAtom(self, cpv, slot, repo, unmask_atoms=None): |
428 |
""" |
429 |
Take a package and return a matching package.mask atom, or None if no |
430 |
- such atom exists or it has been cancelled by package.unmask. PROVIDE |
431 |
- is not checked, so atoms will not be found for old-style virtuals. |
432 |
+ such atom exists or it has been cancelled by package.unmask. |
433 |
|
434 |
@param cpv: The package name |
435 |
@type cpv: String |
436 |
@@ -221,8 +220,7 @@ class MaskManager(object): |
437 |
def getMaskAtom(self, cpv, slot, repo): |
438 |
""" |
439 |
Take a package and return a matching package.mask atom, or None if no |
440 |
- such atom exists or it has been cancelled by package.unmask. PROVIDE |
441 |
- is not checked, so atoms will not be found for old-style virtuals. |
442 |
+ such atom exists or it has been cancelled by package.unmask. |
443 |
|
444 |
@param cpv: The package name |
445 |
@type cpv: String |
446 |
@@ -249,8 +247,6 @@ class MaskManager(object): |
447 |
""" |
448 |
Take a package and return a matching package.mask atom, or None if no |
449 |
such atom exists. It HAS NOT! been cancelled by any package.unmask. |
450 |
- PROVIDE is not checked, so atoms will not be found for old-style |
451 |
- virtuals. |
452 |
|
453 |
@param cpv: The package name |
454 |
@type cpv: String |
455 |
diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py b/pym/portage/package/ebuild/_config/special_env_vars.py |
456 |
index 1753c8b92..65a009d05 100644 |
457 |
--- a/pym/portage/package/ebuild/_config/special_env_vars.py |
458 |
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py |
459 |
@@ -1,4 +1,4 @@ |
460 |
-# Copyright 2010-2014 Gentoo Foundation |
461 |
+# Copyright 2010-2018 Gentoo Foundation |
462 |
# Distributed under the terms of the GNU General Public License v2 |
463 |
|
464 |
from __future__ import unicode_literals |
465 |
@@ -26,7 +26,7 @@ env_blacklist = frozenset(( |
466 |
"PORTAGE_BUILT_USE", "PORTAGE_CONFIGROOT", |
467 |
"PORTAGE_INTERNAL_CALLER", "PORTAGE_IUSE", |
468 |
"PORTAGE_NONFATAL", "PORTAGE_PIPE_FD", "PORTAGE_REPO_NAME", |
469 |
- "PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "REPOSITORY", |
470 |
+ "PORTAGE_USE", "PROPERTIES", "RDEPEND", "REPOSITORY", |
471 |
"REQUIRED_USE", "RESTRICT", "ROOT", "SLOT", "SRC_URI", "_" |
472 |
)) |
473 |
|
474 |
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
475 |
index 10250cf46..6a8605717 100644 |
476 |
--- a/pym/portage/package/ebuild/config.py |
477 |
+++ b/pym/portage/package/ebuild/config.py |
478 |
@@ -157,7 +157,7 @@ class config(object): |
479 |
|
480 |
_setcpv_aux_keys = ('DEFINED_PHASES', 'DEPEND', 'EAPI', 'HDEPEND', |
481 |
'INHERITED', 'IUSE', 'REQUIRED_USE', 'KEYWORDS', 'LICENSE', 'PDEPEND', |
482 |
- 'PROPERTIES', 'PROVIDE', 'RDEPEND', 'SLOT', |
483 |
+ 'PROPERTIES', 'RDEPEND', 'SLOT', |
484 |
'repository', 'RESTRICT', 'LICENSE',) |
485 |
|
486 |
_module_aliases = { |
487 |
@@ -1886,8 +1886,7 @@ class config(object): |
488 |
def _getMaskAtom(self, cpv, metadata): |
489 |
""" |
490 |
Take a package and return a matching package.mask atom, or None if no |
491 |
- such atom exists or it has been cancelled by package.unmask. PROVIDE |
492 |
- is not checked, so atoms will not be found for old-style virtuals. |
493 |
+ such atom exists or it has been cancelled by package.unmask. |
494 |
|
495 |
@param cpv: The package name |
496 |
@type cpv: String |
497 |
@@ -1901,8 +1900,7 @@ class config(object): |
498 |
def _getRawMaskAtom(self, cpv, metadata): |
499 |
""" |
500 |
Take a package and return a matching package.mask atom, or None if no |
501 |
- such atom exists or it has been cancelled by package.unmask. PROVIDE |
502 |
- is not checked, so atoms will not be found for old-style virtuals. |
503 |
+ such atom exists or it has been cancelled by package.unmask. |
504 |
|
505 |
@param cpv: The package name |
506 |
@type cpv: String |
507 |
@@ -1918,8 +1916,7 @@ class config(object): |
508 |
""" |
509 |
Take a package and return a matching profile atom, or None if no |
510 |
such atom exists. Note that a profile atom may or may not have a "*" |
511 |
- prefix. PROVIDE is not checked, so atoms will not be found for |
512 |
- old-style virtuals. |
513 |
+ prefix. |
514 |
|
515 |
@param cpv: The package name |
516 |
@type cpv: String |
517 |
@@ -2157,35 +2154,9 @@ class config(object): |
518 |
self._accept_chost_re.match(pkg_chost) is not None |
519 |
|
520 |
def setinst(self, mycpv, mydbapi): |
521 |
- """This updates the preferences for old-style virtuals, |
522 |
- affecting the behavior of dep_expand() and dep_check() |
523 |
- calls. It can change dbapi.match() behavior since that |
524 |
- calls dep_expand(). However, dbapi instances have |
525 |
- internal match caches that are not invalidated when |
526 |
- preferences are updated here. This can potentially |
527 |
- lead to some inconsistency (relevant to bug #1343).""" |
528 |
- self.modifying() |
529 |
- |
530 |
- # Grab the virtuals this package provides and add them into the tree virtuals. |
531 |
- if not hasattr(mydbapi, "aux_get"): |
532 |
- provides = mydbapi["PROVIDE"] |
533 |
- else: |
534 |
- provides = mydbapi.aux_get(mycpv, ["PROVIDE"])[0] |
535 |
- if not provides: |
536 |
- return |
537 |
- if isinstance(mydbapi, portdbapi): |
538 |
- self.setcpv(mycpv, mydb=mydbapi) |
539 |
- myuse = self["PORTAGE_USE"] |
540 |
- elif not hasattr(mydbapi, "aux_get"): |
541 |
- myuse = mydbapi["USE"] |
542 |
- else: |
543 |
- myuse = mydbapi.aux_get(mycpv, ["USE"])[0] |
544 |
- virts = use_reduce(provides, uselist=myuse.split(), flat=True) |
545 |
- |
546 |
- # Ensure that we don't trigger the _treeVirtuals |
547 |
- # assertion in VirtualsManager._compile_virtuals(). |
548 |
- self.getvirtuals() |
549 |
- self._virtuals_manager.add_depgraph_virtuals(mycpv, virts) |
550 |
+ """This used to update the preferences for old-style virtuals. |
551 |
+ It is no-op now.""" |
552 |
+ pass |
553 |
|
554 |
def reload(self): |
555 |
"""Reload things like /etc/profile.env that can change during runtime.""" |
556 |
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py |
557 |
index ca241aefb..8cec8e4da 100644 |
558 |
--- a/pym/portage/package/ebuild/doebuild.py |
559 |
+++ b/pym/portage/package/ebuild/doebuild.py |
560 |
@@ -135,7 +135,7 @@ _phase_func_map = { |
561 |
} |
562 |
|
563 |
_vdb_use_conditional_keys = Package._dep_keys + \ |
564 |
- ('LICENSE', 'PROPERTIES', 'PROVIDE', 'RESTRICT',) |
565 |
+ ('LICENSE', 'PROPERTIES', 'RESTRICT',) |
566 |
|
567 |
def _doebuild_spawn(phase, settings, actionmap=None, **kwargs): |
568 |
""" |
569 |
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py |
570 |
index 52f44d526..b5db4855f 100644 |
571 |
--- a/pym/portage/repository/config.py |
572 |
+++ b/pym/portage/repository/config.py |
573 |
@@ -264,7 +264,7 @@ class RepoConfig(object): |
574 |
self.missing_repo_name = False |
575 |
|
576 |
for value in ('allow-missing-manifest', |
577 |
- 'allow-provide-virtual', 'cache-formats', |
578 |
+ 'cache-formats', |
579 |
'create-manifest', 'disable-manifest', 'manifest-hashes', |
580 |
'manifest-required-hashes', 'profile-formats', |
581 |
'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'): |
582 |
@@ -1012,9 +1012,6 @@ def parse_layout_conf(repo_location, repo_name=None): |
583 |
data['masters'] = masters |
584 |
data['aliases'] = tuple(layout_data.get('aliases', '').split()) |
585 |
|
586 |
- data['allow-provide-virtual'] = \ |
587 |
- layout_data.get('allow-provide-virtuals', 'false').lower() == 'true' |
588 |
- |
589 |
data['eapis-banned'] = tuple(layout_data.get('eapis-banned', '').split()) |
590 |
data['eapis-deprecated'] = tuple(layout_data.get('eapis-deprecated', '').split()) |
591 |
|
592 |
diff --git a/pym/portage/tests/resolver/test_virtual_transition.py b/pym/portage/tests/resolver/test_virtual_transition.py |
593 |
deleted file mode 100644 |
594 |
index 3f4171eae..000000000 |
595 |
--- a/pym/portage/tests/resolver/test_virtual_transition.py |
596 |
+++ /dev/null |
597 |
@@ -1,51 +0,0 @@ |
598 |
-# Copyright 2011 Gentoo Foundation |
599 |
-# Distributed under the terms of the GNU General Public License v2 |
600 |
- |
601 |
-from portage.tests import TestCase |
602 |
-from portage.tests.resolver.ResolverPlayground import (ResolverPlayground, |
603 |
- ResolverPlaygroundTestCase) |
604 |
- |
605 |
-class VirtualTransitionTestCase(TestCase): |
606 |
- |
607 |
- def testVirtualTransition(self): |
608 |
- ebuilds = { |
609 |
- "kde-base/kcron-4.7.1" : {"RDEPEND": "virtual/cron" }, |
610 |
- "sys-process/vixie-cron-4.1-r11": {}, |
611 |
- "virtual/cron-0" : {"RDEPEND": "sys-process/vixie-cron" }, |
612 |
- } |
613 |
- installed = { |
614 |
- "kde-base/kcron-4.7.1" : {"RDEPEND": "virtual/cron" }, |
615 |
- "sys-process/vixie-cron-4.1-r11" : {"PROVIDE" : "virtual/cron"}, |
616 |
- } |
617 |
- |
618 |
- world = ["kde-base/kcron", "sys-process/vixie-cron"] |
619 |
- |
620 |
- test_cases = ( |
621 |
- |
622 |
- # Pull in a new-style virtual, even though there is an installed |
623 |
- # old-style virtual to satisfy the virtual/cron dep. This case |
624 |
- # is common, due to PROVIDE being removed (without revision bump) |
625 |
- # from lots of ebuilds. |
626 |
- ResolverPlaygroundTestCase( |
627 |
- ["@world"], |
628 |
- options = {"--update": True, "--deep": True}, |
629 |
- success = True, |
630 |
- mergelist = ["virtual/cron-0"]), |
631 |
- |
632 |
- # Make sure that depclean is satisfied with the installed |
633 |
- # old-style virutal. |
634 |
- ResolverPlaygroundTestCase( |
635 |
- [], |
636 |
- options = {"--depclean": True}, |
637 |
- success = True, |
638 |
- cleanlist = []), |
639 |
- ) |
640 |
- |
641 |
- playground = ResolverPlayground(ebuilds=ebuilds, |
642 |
- installed=installed, world=world) |
643 |
- try: |
644 |
- for test_case in test_cases: |
645 |
- playground.run_TestCase(test_case) |
646 |
- self.assertEqual(test_case.test_success, True, test_case.fail_msg) |
647 |
- finally: |
648 |
- playground.cleanup() |
649 |
diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1 |
650 |
index b2542b0c7..db6526b5e 100644 |
651 |
--- a/repoman/man/repoman.1 |
652 |
+++ b/repoman/man/repoman.1 |
653 |
@@ -250,9 +250,6 @@ and is not masked in the global package.mask. |
654 |
.B PDEPEND.suspect |
655 |
PDEPEND contains a package that usually only belongs in DEPEND |
656 |
.TP |
657 |
-.B PROVIDE.syntax |
658 |
-Syntax error in PROVIDE (usually an extra/missing space/parenthesis) |
659 |
-.TP |
660 |
.B RDEPEND.implicit |
661 |
RDEPEND is unset in the ebuild which triggers implicit RDEPEND=$DEPEND |
662 |
assignment (prior to EAPI 4) |
663 |
@@ -433,10 +430,6 @@ Assigning a readonly variable |
664 |
.B variable.usedwithhelpers |
665 |
Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers |
666 |
.TP |
667 |
-.B virtual.oldstyle |
668 |
-The ebuild PROVIDEs an old-style virtual (see GLEP 37). This is an error |
669 |
-unless "allow\-provide\-virtuals = true" is set in metadata/layout.conf. |
670 |
-.TP |
671 |
.B virtual.suspect |
672 |
Ebuild contains a package that usually should be pulled via virtual/, |
673 |
not directly. |
674 |
diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
675 |
index 11435f99e..48d79f188 100644 |
676 |
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
677 |
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
678 |
@@ -69,7 +69,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata): |
679 |
inherited_wxwidgets_eclass = "wxwidgets" in ebuild.inherited |
680 |
# operator_tokens = set(["||", "(", ")"]) |
681 |
badsyntax = [] |
682 |
- for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES", "PROVIDE"): |
683 |
+ for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES"): |
684 |
mydepstr = ebuild.metadata[mytype] |
685 |
|
686 |
buildtime = mytype in Package._buildtime_keys |
687 |
diff --git a/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py b/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py |
688 |
index cba8ec5e2..938567d4c 100644 |
689 |
--- a/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py |
690 |
+++ b/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py |
691 |
@@ -49,12 +49,6 @@ class EbuildMetadata(ScanBase): |
692 |
% (kwargs.get('xpkg'), kwargs.get('y_ebuild'))) |
693 |
return False |
694 |
|
695 |
- def old_virtual(self, **kwargs): |
696 |
- ebuild = kwargs.get('ebuild').get() |
697 |
- if ebuild.metadata.get("PROVIDE"): |
698 |
- self.qatracker.add_error("virtual.oldstyle", ebuild.relative_path) |
699 |
- return False |
700 |
- |
701 |
def virtual(self, **kwargs): |
702 |
ebuild = kwargs.get('ebuild').get() |
703 |
if kwargs.get('catdir') == "virtual": |
704 |
@@ -80,5 +74,5 @@ class EbuildMetadata(ScanBase): |
705 |
|
706 |
@property |
707 |
def runInEbuilds(self): |
708 |
- return (True, [self.invalidchar, self.missing, self.old_virtual, |
709 |
+ return (True, [self.invalidchar, self.missing, |
710 |
self.virtual, self.homepage_urischeme]) |
711 |
diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py |
712 |
index c6abe1760..7be048725 100644 |
713 |
--- a/repoman/pym/repoman/qa_data.py |
714 |
+++ b/repoman/pym/repoman/qa_data.py |
715 |
@@ -228,8 +228,6 @@ qahelp = { |
716 |
"repo.eapi.deprecated": ( |
717 |
"The ebuild uses an EAPI which is" |
718 |
" deprecated by the repository's metadata/layout.conf settings"), |
719 |
- "virtual.oldstyle": ( |
720 |
- "The ebuild PROVIDEs an old-style virtual (see GLEP 37)"), |
721 |
"virtual.suspect": ( |
722 |
"Ebuild contains a package" |
723 |
" that usually should be pulled via virtual/, not directly."), |
724 |
diff --git a/repoman/pym/repoman/repos.py b/repoman/pym/repoman/repos.py |
725 |
index e942a599e..6bf286002 100644 |
726 |
--- a/repoman/pym/repoman/repos.py |
727 |
+++ b/repoman/pym/repoman/repos.py |
728 |
@@ -60,9 +60,6 @@ class RepoSettings(object): |
729 |
if repo.location not in self.repo_config.eclass_db.porttrees: |
730 |
del self.repositories[repo.name] |
731 |
|
732 |
- if self.repo_config.allow_provide_virtual: |
733 |
- qawarnings.add("virtual.oldstyle") |
734 |
- |
735 |
if self.repo_config.sign_commit and options.mode in ("commit", "fix", "manifest"): |
736 |
if vcs_settings.vcs: |
737 |
func = getattr(self, '_vcs_gpg_%s' % vcs_settings.vcs) |
738 |
-- |
739 |
2.16.2 |