commit:     7ddb34f2d7729a632e1fdf2cbbcbf3b860b4d5ff
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 11 15:42:42 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar 14 10:15:22 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7ddb34f2

Remove support for PROVIDE virtuals

Remove the support for PROVIDE metadata. The aux entry that used to
be assigned to this variable is now reused in the PMS, so we finally
need to clean up.

Closes: https://github.com/gentoo/portage/pull/266
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild.sh                                      |  2 +-
 bin/phase-functions.sh                             |  2 +-
 man/ebuild.5                                       | 10 -----
 pym/_emerge/Package.py                             | 27 ++----------
 pym/portage/__init__.py                            |  2 +-
 pym/portage/_sets/base.py                          | 17 +-------
 pym/portage/cache/metadata.py                      |  4 +-
 pym/portage/dbapi/__init__.py                      |  4 +-
 pym/portage/dbapi/bintree.py                       |  9 ++--
 pym/portage/dbapi/dep_expand.py                    |  2 +-
 pym/portage/dbapi/porttree.py                      |  4 +-
 pym/portage/dbapi/vartree.py                       | 38 ++--------------
 pym/portage/dep/__init__.py                        | 20 +--------
 pym/portage/emaint/modules/move/move.py            |  4 +-
 pym/portage/package/ebuild/_config/MaskManager.py  | 10 ++---
 .../package/ebuild/_config/special_env_vars.py     |  4 +-
 pym/portage/package/ebuild/config.py               | 43 +++---------------
 pym/portage/package/ebuild/doebuild.py             |  2 +-
 pym/portage/repository/config.py                   |  5 +--
 .../tests/resolver/test_virtual_transition.py      | 51 ----------------------
 repoman/man/repoman.1                              |  7 ---
 .../repoman/modules/scan/depend/_depend_checks.py  |  2 +-
 .../modules/scan/metadata/ebuild_metadata.py       |  8 +---
 repoman/pym/repoman/qa_data.py                     |  5 ---
 repoman/pym/repoman/repos.py                       |  3 --
 25 files changed, 43 insertions(+), 242 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 67d255f78..9995a2f99 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -728,7 +728,7 @@ if [[ $EBUILD_PHASE = depend ]] ; then
        fi
 
        auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
-               DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND 
PROVIDE EAPI
+               DESCRIPTION KEYWORDS INHERITED IUSE REQUIRED_USE PDEPEND 
UNUSED_05 EAPI
                PROPERTIES DEFINED_PHASES HDEPEND UNUSED_04
                UNUSED_03 UNUSED_02 UNUSED_01"
 

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 017dc132b..0ceddb451 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -9,7 +9,7 @@
 
 PORTAGE_READONLY_METADATA="DEFINED_PHASES DEPEND DESCRIPTION
        EAPI HDEPEND HOMEPAGE INHERITED IUSE REQUIRED_USE KEYWORDS LICENSE
-       PDEPEND PROVIDE RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
+       PDEPEND RDEPEND REPOSITORY RESTRICT SLOT SRC_URI"
 
 PORTAGE_READONLY_VARS="D EBUILD EBUILD_PHASE EBUILD_PHASE_FUNC \
        EBUILD_SH_ARGS EMERGE_FROM FILESDIR MERGE_TYPE \

diff --git a/man/ebuild.5 b/man/ebuild.5
index 71e754d48..eb27d43bb 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -726,16 +726,6 @@ A space delimited list of properties, with conditional 
syntax support.
 One or more ebuild phases will produce a prompt that requires user interaction.
 .RE
 .PD 1
-.TP
-.B PROVIDE\fR = \fI"virtual/TARGET"
-This variable should only be used when a package provides a virtual target.
-For example, blackdown\-jdk and sun\-jdk provide \fIvirtual/jdk\fR.  This
-allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown
-or sun specifically.
-
-The \fBPROVIDE\fR variable has been deprecated. See
-\fIhttps://www.gentoo.org/glep/glep-0037.html\fR for details.
-
 .TP
 .B DOCS
 Beginning with \fBEAPI 4\fR, an array or space\-delimited list of documentation

diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index cebfd8281..b7911c5f4 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -44,7 +44,7 @@ class Package(Task):
        metadata_keys = [
                "BUILD_ID", "BUILD_TIME", "CHOST", "COUNTER", "DEFINED_PHASES",
                "DEPEND", "EAPI", "HDEPEND", "INHERITED", "IUSE", "KEYWORDS",
-               "LICENSE", "MD5", "PDEPEND", "PROVIDE", "PROVIDES",
+               "LICENSE", "MD5", "PDEPEND", "PROVIDES",
                "RDEPEND", "repository", "REQUIRED_USE",
                "PROPERTIES", "REQUIRES", "RESTRICT", "SIZE",
                "SLOT", "USE", "_mtime_"]
@@ -165,17 +165,7 @@ class Package(Task):
 
        @property
        def provided_cps(self):
-
-               if self._provided_cps is None:
-                       provided_cps = [self.cp]
-                       for atom in self._metadata["PROVIDE"].split():
-                               try:
-                                       provided_cps.append(Atom(atom).cp)
-                               except InvalidAtom:
-                                       pass
-                       self._provided_cps = tuple(provided_cps)
-
-               return self._provided_cps
+               return (self.cp,)
 
        @property
        def restrict(self):
@@ -324,15 +314,6 @@ class Package(Task):
                self._validated_atoms = tuple(set(atom for atom in
                        validated_atoms if isinstance(atom, Atom)))
 
-               k = 'PROVIDE'
-               v = self._metadata.get(k)
-               if v:
-                       try:
-                               use_reduce(v, eapi=dep_eapi, matchall=True,
-                                       is_valid_flag=dep_valid_flag, 
token_class=Atom)
-                       except InvalidDependString as e:
-                               self._invalid_metadata("PROVIDE.syntax", "%s: 
%s" % (k, e))
-
                for k in self._use_conditional_misc_keys:
                        v = self._metadata.get(k)
                        if not v:
@@ -873,7 +854,7 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase):
        _wrapped_keys = frozenset(
                ["COUNTER", "INHERITED", "USE", "_mtime_"])
        _use_conditional_keys = frozenset(
-               ['LICENSE', 'PROPERTIES', 'PROVIDE', 'RESTRICT',])
+               ['LICENSE', 'PROPERTIES', 'RESTRICT',])
 
        def __init__(self, pkg, metadata):
                _PackageMetadataWrapperBase.__init__(self)

diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 69658b432..8596b89b1 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -508,7 +508,7 @@ auxdbkeys = (
   'DEPEND',    'RDEPEND',   'SLOT',      'SRC_URI',
        'RESTRICT',  'HOMEPAGE',  'LICENSE',   'DESCRIPTION',
        'KEYWORDS',  'INHERITED', 'IUSE', 'REQUIRED_USE',
-       'PDEPEND',   'PROVIDE', 'EAPI',
+       'PDEPEND',   'UNUSED_05', 'EAPI',
        'PROPERTIES', 'DEFINED_PHASES', 'HDEPEND', 'UNUSED_04',
        'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
 )

diff --git a/pym/portage/_sets/base.py b/pym/portage/_sets/base.py
index ee20d3671..aba295602 100644
--- a/pym/portage/_sets/base.py
+++ b/pym/portage/_sets/base.py
@@ -1,4 +1,4 @@
-# Copyright 2007-2014 Gentoo Foundation
+# Copyright 2007-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import sys
@@ -157,21 +157,6 @@ class PackageSet(object):
                        for atom in atoms:
                                if match_from_list(atom, cpv_slot_list):
                                        yield atom
-               provides = pkg._metadata['PROVIDE']
-               if not provides:
-                       return
-               provides = provides.split()
-               for provide in provides:
-                       try:
-                               provided_cp = Atom(provide).cp
-                       except InvalidAtom:
-                               continue
-                       atoms = self._atommap.get(provided_cp)
-                       if atoms:
-                               for atom in atoms:
-                                       if 
match_from_list(atom.replace(provided_cp, cp),
-                                               cpv_slot_list):
-                                               yield atom
 
 class EditablePackageSet(PackageSet):
 

diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py
index 0c588bde9..12639c6a1 100644
--- a/pym/portage/cache/metadata.py
+++ b/pym/portage/cache/metadata.py
@@ -1,4 +1,4 @@
-# Copyright 2005-2014 Gentoo Foundation
+# Copyright 2005-2018 Gentoo Foundation
 # Author(s): Brian Harring (ferri...@gentoo.org)
 # License: GPL2
 
@@ -29,7 +29,7 @@ class database(flat_hash.database):
        auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
                'RESTRICT',  'HOMEPAGE',  'LICENSE', 'DESCRIPTION',
                'KEYWORDS',  'INHERITED', 'IUSE', 'REQUIRED_USE',
-               'PDEPEND',   'PROVIDE', 'EAPI', 'PROPERTIES',
+               'PDEPEND',   'UNUSED', 'EAPI', 'PROPERTIES',
                'DEFINED_PHASES', 'HDEPEND')
 
        autocommits = True

diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index 2574b63df..c1b5d967d 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2014 Gentoo Foundation
+# Copyright 1998-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -316,7 +316,7 @@ class dbapi(object):
                maxval = len(cpv_all)
                aux_get = self.aux_get
                aux_update = self.aux_update
-               update_keys = Package._dep_keys + ("PROVIDE",)
+               update_keys = Package._dep_keys
                meta_keys = update_keys + self._pkg_str_aux_keys
                repo_dict = None
                if isinstance(updates, dict):

diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 201666c41..839897a41 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2016 Gentoo Foundation
+# Copyright 1998-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -87,7 +87,7 @@ class bindbapi(fakedbapi):
                self._aux_cache_keys = set(
                        ["BUILD_ID", "BUILD_TIME", "CHOST", "DEFINED_PHASES",
                        "DEPEND", "EAPI", "HDEPEND", "IUSE", "KEYWORDS",
-                       "LICENSE", "MD5", "PDEPEND", "PROPERTIES", "PROVIDE",
+                       "LICENSE", "MD5", "PDEPEND", "PROPERTIES",
                        "PROVIDES", "RDEPEND", "repository", "REQUIRES", 
"RESTRICT",
                        "SIZE", "SLOT", "USE", "_mtime_"
                        ])
@@ -315,13 +315,13 @@ class binarytree(object):
                                ["BASE_URI", "BUILD_ID", "BUILD_TIME", "CHOST",
                                "DEFINED_PHASES", "DEPEND", "DESCRIPTION", 
"EAPI",
                                "HDEPEND", "IUSE", "KEYWORDS", "LICENSE", 
"PDEPEND",
-                               "PKGINDEX_URI", "PROPERTIES", "PROVIDE", 
"PROVIDES",
+                               "PKGINDEX_URI", "PROPERTIES", "PROVIDES",
                                "RDEPEND", "repository", "REQUIRES", "RESTRICT",
                                "SIZE", "SLOT", "USE"]
                        self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
                        self._pkgindex_use_evaluated_keys = \
                                ("DEPEND", "HDEPEND", "LICENSE", "RDEPEND",
-                               "PDEPEND", "PROPERTIES", "PROVIDE", "RESTRICT")
+                               "PDEPEND", "PROPERTIES", "RESTRICT")
                        self._pkgindex_header_keys = set([
                                "ACCEPT_KEYWORDS", "ACCEPT_LICENSE",
                                "ACCEPT_PROPERTIES", "ACCEPT_RESTRICT", 
"CBUILD",
@@ -342,7 +342,6 @@ class binarytree(object):
                                "PATH"    : "",
                                "PDEPEND" : "",
                                "PROPERTIES" : "",
-                               "PROVIDE" : "",
                                "PROVIDES": "",
                                "RDEPEND" : "",
                                "REQUIRES": "",

diff --git a/pym/portage/dbapi/dep_expand.py b/pym/portage/dbapi/dep_expand.py
index 3de5d8fc3..9515b7dec 100644
--- a/pym/portage/dbapi/dep_expand.py
+++ b/pym/portage/dbapi/dep_expand.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals

diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index f8ff4833b..1353ac666 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2015 Gentoo Foundation
+# Copyright 1998-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -314,7 +314,7 @@ class portdbapi(dbapi):
                self._aux_cache_keys = set(
                        ["DEPEND", "EAPI", "HDEPEND",
                        "INHERITED", "IUSE", "KEYWORDS", "LICENSE",
-                       "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", 
"repository",
+                       "PDEPEND", "PROPERTIES", "RDEPEND", "repository",
                        "RESTRICT", "SLOT", "DEFINED_PHASES", "REQUIRED_USE"])
 
                self._aux_cache = {}

diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index b28b1c56c..8b1b77f7d 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2017 Gentoo Foundation
+# Copyright 1998-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import division, unicode_literals
@@ -179,7 +179,7 @@ class vardbapi(dbapi):
                        ["BUILD_TIME", "CHOST", "COUNTER", "DEPEND", 
"DESCRIPTION",
                        "EAPI", "HDEPEND", "HOMEPAGE",
                        "BUILD_ID", "IUSE", "KEYWORDS",
-                       "LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", 
"RDEPEND",
+                       "LICENSE", "PDEPEND", "PROPERTIES", "RDEPEND",
                        "repository", "RESTRICT" , "SLOT", "USE", 
"DEFINED_PHASES",
                        "PROVIDES", "REQUIRES"
                        ])
@@ -1475,40 +1475,10 @@ class vartree(object):
                return
 
        def get_provide(self, mycpv):
-               myprovides = []
-               mylines = None
-               try:
-                       mylines, myuse = self.dbapi.aux_get(mycpv, ["PROVIDE", 
"USE"])
-                       if mylines:
-                               myuse = myuse.split()
-                               mylines = use_reduce(mylines, uselist=myuse, 
flat=True)
-                               for myprovide in mylines:
-                                       mys = catpkgsplit(myprovide)
-                                       if not mys:
-                                               mys = myprovide.split("/")
-                                       myprovides += [mys[0] + "/" + mys[1]]
-                       return myprovides
-               except SystemExit as e:
-                       raise
-               except Exception as e:
-                       mydir = self.dbapi.getpath(mycpv)
-                       writemsg(_("\nParse Error reading PROVIDE and USE in 
'%s'\n") % mydir,
-                               noiselevel=-1)
-                       if mylines:
-                               writemsg(_("Possibly Invalid: '%s'\n") % 
str(mylines),
-                                       noiselevel=-1)
-                       writemsg(_("Exception: %s\n\n") % str(e), noiselevel=-1)
-                       return []
+               return []
 
        def get_all_provides(self):
-               myprovides = {}
-               for node in self.getallcpv():
-                       for mykey in self.get_provide(node):
-                               if mykey in myprovides:
-                                       myprovides[mykey] += [node]
-                               else:
-                                       myprovides[mykey] = [node]
-               return myprovides
+               return {}
 
        def dep_bestmatch(self, mydep, use_cache=1):
                "compatibility method -- all matches, not just visible ones"

diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index 3d4bca08f..26595da47 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -1595,30 +1595,14 @@ class Atom(_unicode):
 
        def match(self, pkg):
                """
-               Check if the given package instance matches this atom. This
-               includes support for virtual matches via PROVIDE metadata.
+               Check if the given package instance matches this atom.
 
                @param pkg: a Package instance
                @type pkg: Package
                @return: True if this atom matches pkg, otherwise False
                @rtype: bool
                """
-               if pkg.cp == self.cp:
-                       return bool(match_from_list(self, [pkg]))
-               else:
-                       try:
-                               provided_cps = pkg.provided_cps
-                       except AttributeError:
-                               # Since _pkg_str instances lack PROVIDE 
metadata,
-                               # just ignore this case (PROVIDE has been 
deprecated
-                               # for years).
-                               pass
-                       else:
-                               for provided_cp in provided_cps:
-                                       if provided_cp == self.cp:
-                                               return bool(match_from_list(
-                                                       self.replace(self.cp, 
provided_cp, 1), [pkg]))
-               return False
+               return bool(match_from_list(self, [pkg]))
 
 _extended_cp_re_cache = {}
 

diff --git a/pym/portage/emaint/modules/move/move.py 
b/pym/portage/emaint/modules/move/move.py
index 4e505ceee..e9a6acb6b 100644
--- a/pym/portage/emaint/modules/move/move.py
+++ b/pym/portage/emaint/modules/move/move.py
@@ -1,4 +1,4 @@
-# Copyright 2005-2012 Gentoo Foundation
+# Copyright 2005-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import portage
@@ -12,7 +12,7 @@ class MoveHandler(object):
        def __init__(self, tree, porttree):
                self._tree = tree
                self._portdb = porttree.dbapi
-               self._update_keys = Package._dep_keys + ("PROVIDE",)
+               self._update_keys = Package._dep_keys
                self._master_repo = self._portdb.repositories.mainRepo()
                if self._master_repo is not None:
                        self._master_repo = self._master_repo.name

diff --git a/pym/portage/package/ebuild/_config/MaskManager.py 
b/pym/portage/package/ebuild/_config/MaskManager.py
index 44aba23bb..40cc6e0c4 100644
--- a/pym/portage/package/ebuild/_config/MaskManager.py
+++ b/pym/portage/package/ebuild/_config/MaskManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = (
@@ -182,8 +182,7 @@ class MaskManager(object):
        def _getMaskAtom(self, cpv, slot, repo, unmask_atoms=None):
                """
                Take a package and return a matching package.mask atom, or None 
if no
-               such atom exists or it has been cancelled by package.unmask. 
PROVIDE
-               is not checked, so atoms will not be found for old-style 
virtuals.
+               such atom exists or it has been cancelled by package.unmask.
 
                @param cpv: The package name
                @type cpv: String
@@ -221,8 +220,7 @@ class MaskManager(object):
        def getMaskAtom(self, cpv, slot, repo):
                """
                Take a package and return a matching package.mask atom, or None 
if no
-               such atom exists or it has been cancelled by package.unmask. 
PROVIDE
-               is not checked, so atoms will not be found for old-style 
virtuals.
+               such atom exists or it has been cancelled by package.unmask.
 
                @param cpv: The package name
                @type cpv: String
@@ -249,8 +247,6 @@ class MaskManager(object):
                """
                Take a package and return a matching package.mask atom, or None 
if no
                such atom exists. It HAS NOT! been cancelled by any 
package.unmask.
-               PROVIDE is not checked, so atoms will not be found for old-style
-               virtuals.
 
                @param cpv: The package name
                @type cpv: String

diff --git a/pym/portage/package/ebuild/_config/special_env_vars.py 
b/pym/portage/package/ebuild/_config/special_env_vars.py
index 1753c8b92..65a009d05 100644
--- a/pym/portage/package/ebuild/_config/special_env_vars.py
+++ b/pym/portage/package/ebuild/_config/special_env_vars.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -26,7 +26,7 @@ env_blacklist = frozenset((
        "PORTAGE_BUILT_USE", "PORTAGE_CONFIGROOT",
        "PORTAGE_INTERNAL_CALLER", "PORTAGE_IUSE",
        "PORTAGE_NONFATAL", "PORTAGE_PIPE_FD", "PORTAGE_REPO_NAME",
-       "PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "REPOSITORY",
+       "PORTAGE_USE", "PROPERTIES", "RDEPEND", "REPOSITORY",
        "REQUIRED_USE", "RESTRICT", "ROOT", "SLOT", "SRC_URI", "_"
 ))
 

diff --git a/pym/portage/package/ebuild/config.py 
b/pym/portage/package/ebuild/config.py
index 898626ecc..3dc64a067 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -157,7 +157,7 @@ class config(object):
 
        _setcpv_aux_keys = ('DEFINED_PHASES', 'DEPEND', 'EAPI', 'HDEPEND',
                'INHERITED', 'IUSE', 'REQUIRED_USE', 'KEYWORDS', 'LICENSE', 
'PDEPEND',
-               'PROPERTIES', 'PROVIDE', 'RDEPEND', 'SLOT',
+               'PROPERTIES', 'RDEPEND', 'SLOT',
                'repository', 'RESTRICT', 'LICENSE',)
 
        _module_aliases = {
@@ -1886,8 +1886,7 @@ class config(object):
        def _getMaskAtom(self, cpv, metadata):
                """
                Take a package and return a matching package.mask atom, or None 
if no
-               such atom exists or it has been cancelled by package.unmask. 
PROVIDE
-               is not checked, so atoms will not be found for old-style 
virtuals.
+               such atom exists or it has been cancelled by package.unmask.
 
                @param cpv: The package name
                @type cpv: String
@@ -1901,8 +1900,7 @@ class config(object):
        def _getRawMaskAtom(self, cpv, metadata):
                """
                Take a package and return a matching package.mask atom, or None 
if no
-               such atom exists or it has been cancelled by package.unmask. 
PROVIDE
-               is not checked, so atoms will not be found for old-style 
virtuals.
+               such atom exists or it has been cancelled by package.unmask.
 
                @param cpv: The package name
                @type cpv: String
@@ -1918,8 +1916,7 @@ class config(object):
                """
                Take a package and return a matching profile atom, or None if no
                such atom exists. Note that a profile atom may or may not have 
a "*"
-               prefix. PROVIDE is not checked, so atoms will not be found for
-               old-style virtuals.
+               prefix.
 
                @param cpv: The package name
                @type cpv: String
@@ -2157,35 +2154,9 @@ class config(object):
                        self._accept_chost_re.match(pkg_chost) is not None
 
        def setinst(self, mycpv, mydbapi):
-               """This updates the preferences for old-style virtuals,
-               affecting the behavior of dep_expand() and dep_check()
-               calls. It can change dbapi.match() behavior since that
-               calls dep_expand(). However, dbapi instances have
-               internal match caches that are not invalidated when
-               preferences are updated here. This can potentially
-               lead to some inconsistency (relevant to bug #1343)."""
-               self.modifying()
-
-               # Grab the virtuals this package provides and add them into the 
tree virtuals.
-               if not hasattr(mydbapi, "aux_get"):
-                       provides = mydbapi["PROVIDE"]
-               else:
-                       provides = mydbapi.aux_get(mycpv, ["PROVIDE"])[0]
-               if not provides:
-                       return
-               if isinstance(mydbapi, portdbapi):
-                       self.setcpv(mycpv, mydb=mydbapi)
-                       myuse = self["PORTAGE_USE"]
-               elif not hasattr(mydbapi, "aux_get"):
-                       myuse = mydbapi["USE"]
-               else:
-                       myuse = mydbapi.aux_get(mycpv, ["USE"])[0]
-               virts = use_reduce(provides, uselist=myuse.split(), flat=True)
-
-               # Ensure that we don't trigger the _treeVirtuals
-               # assertion in VirtualsManager._compile_virtuals().
-               self.getvirtuals()
-               self._virtuals_manager.add_depgraph_virtuals(mycpv, virts)
+               """This used to update the preferences for old-style virtuals.
+               It is no-op now."""
+               pass
 
        def reload(self):
                """Reload things like /etc/profile.env that can change during 
runtime."""

diff --git a/pym/portage/package/ebuild/doebuild.py 
b/pym/portage/package/ebuild/doebuild.py
index ca241aefb..8cec8e4da 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -135,7 +135,7 @@ _phase_func_map = {
 }
 
 _vdb_use_conditional_keys = Package._dep_keys + \
-       ('LICENSE', 'PROPERTIES', 'PROVIDE', 'RESTRICT',)
+       ('LICENSE', 'PROPERTIES', 'RESTRICT',)
 
 def _doebuild_spawn(phase, settings, actionmap=None, **kwargs):
        """

diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 52f44d526..b5db4855f 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -264,7 +264,7 @@ class RepoConfig(object):
                                self.missing_repo_name = False
 
                        for value in ('allow-missing-manifest',
-                               'allow-provide-virtual', 'cache-formats',
+                               'cache-formats',
                                'create-manifest', 'disable-manifest', 
'manifest-hashes',
                                'manifest-required-hashes', 'profile-formats',
                                'sign-commit', 'sign-manifest', 
'thin-manifest', 'update-changelog'):
@@ -1012,9 +1012,6 @@ def parse_layout_conf(repo_location, repo_name=None):
        data['masters'] = masters
        data['aliases'] = tuple(layout_data.get('aliases', '').split())
 
-       data['allow-provide-virtual'] = \
-               layout_data.get('allow-provide-virtuals', 'false').lower() == 
'true'
-
        data['eapis-banned'] = tuple(layout_data.get('eapis-banned', 
'').split())
        data['eapis-deprecated'] = tuple(layout_data.get('eapis-deprecated', 
'').split())
 

diff --git a/pym/portage/tests/resolver/test_virtual_transition.py 
b/pym/portage/tests/resolver/test_virtual_transition.py
deleted file mode 100644
index 3f4171eae..000000000
--- a/pym/portage/tests/resolver/test_virtual_transition.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-from portage.tests import TestCase
-from portage.tests.resolver.ResolverPlayground import (ResolverPlayground,
-       ResolverPlaygroundTestCase)
-
-class VirtualTransitionTestCase(TestCase):
-
-       def testVirtualTransition(self):
-               ebuilds = {
-                       "kde-base/kcron-4.7.1" : {"RDEPEND": "virtual/cron" },
-                       "sys-process/vixie-cron-4.1-r11": {},
-                       "virtual/cron-0" : {"RDEPEND": "sys-process/vixie-cron" 
},
-               }
-               installed = {
-                       "kde-base/kcron-4.7.1" : {"RDEPEND": "virtual/cron" },
-                       "sys-process/vixie-cron-4.1-r11" : {"PROVIDE" : 
"virtual/cron"},
-               }
-
-               world = ["kde-base/kcron", "sys-process/vixie-cron"]
-
-               test_cases = (
-
-                       # Pull in a new-style virtual, even though there is an 
installed
-                       # old-style virtual to satisfy the virtual/cron dep. 
This case
-                       # is common, due to PROVIDE being removed (without 
revision bump)
-                       # from lots of ebuilds.
-                       ResolverPlaygroundTestCase(
-                               ["@world"],
-                               options = {"--update": True, "--deep": True},
-                               success = True,
-                               mergelist = ["virtual/cron-0"]),
-
-                       # Make sure that depclean is satisfied with the 
installed
-                       # old-style virutal.
-                       ResolverPlaygroundTestCase(
-                               [],
-                               options = {"--depclean": True},
-                               success = True,
-                               cleanlist = []),
-               )
-
-               playground = ResolverPlayground(ebuilds=ebuilds,
-                       installed=installed, world=world)
-               try:
-                       for test_case in test_cases:
-                               playground.run_TestCase(test_case)
-                               self.assertEqual(test_case.test_success, True, 
test_case.fail_msg)
-               finally:
-                       playground.cleanup()

diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
index b2542b0c7..db6526b5e 100644
--- a/repoman/man/repoman.1
+++ b/repoman/man/repoman.1
@@ -250,9 +250,6 @@ and is not masked in the global package.mask.
 .B PDEPEND.suspect
 PDEPEND contains a package that usually only belongs in DEPEND
 .TP
-.B PROVIDE.syntax
-Syntax error in PROVIDE (usually an extra/missing space/parenthesis)
-.TP
 .B RDEPEND.implicit
 RDEPEND is unset in the ebuild which triggers implicit RDEPEND=$DEPEND
 assignment (prior to EAPI 4)
@@ -433,10 +430,6 @@ Assigning a readonly variable
 .B variable.usedwithhelpers
 Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
 .TP
-.B virtual.oldstyle
-The ebuild PROVIDEs an old-style virtual (see GLEP 37). This is an error
-unless "allow\-provide\-virtuals = true" is set in metadata/layout.conf.
-.TP
 .B virtual.suspect
 Ebuild contains a package that usually should be pulled via virtual/,
 not directly.

diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py 
b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
index 11435f99e..48d79f188 100644
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
@@ -69,7 +69,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, 
repo_metadata):
        inherited_wxwidgets_eclass = "wxwidgets" in ebuild.inherited
        # operator_tokens = set(["||", "(", ")"])
        badsyntax = []
-       for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES", "PROVIDE"):
+       for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES"):
                mydepstr = ebuild.metadata[mytype]
 
                buildtime = mytype in Package._buildtime_keys

diff --git a/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py 
b/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py
index cba8ec5e2..938567d4c 100644
--- a/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py
+++ b/repoman/pym/repoman/modules/scan/metadata/ebuild_metadata.py
@@ -49,12 +49,6 @@ class EbuildMetadata(ScanBase):
                                        % (kwargs.get('xpkg'), 
kwargs.get('y_ebuild')))
                return False
 
-       def old_virtual(self, **kwargs):
-               ebuild = kwargs.get('ebuild').get()
-               if ebuild.metadata.get("PROVIDE"):
-                       self.qatracker.add_error("virtual.oldstyle", 
ebuild.relative_path)
-               return False
-
        def virtual(self, **kwargs):
                ebuild = kwargs.get('ebuild').get()
                if kwargs.get('catdir') == "virtual":
@@ -80,5 +74,5 @@ class EbuildMetadata(ScanBase):
 
        @property
        def runInEbuilds(self):
-               return (True, [self.invalidchar, self.missing, self.old_virtual,
+               return (True, [self.invalidchar, self.missing,
                        self.virtual, self.homepage_urischeme])

diff --git a/repoman/pym/repoman/qa_data.py b/repoman/pym/repoman/qa_data.py
index c6abe1760..38feef209 100644
--- a/repoman/pym/repoman/qa_data.py
+++ b/repoman/pym/repoman/qa_data.py
@@ -130,9 +130,6 @@ qahelp = {
        "LICENSE.syntax": (
                "Syntax error in LICENSE"
                " (usually an extra/missing space/parenthesis)"),
-       "PROVIDE.syntax": (
-               "Syntax error in PROVIDE"
-               " (usually an extra/missing space/parenthesis)"),
        "PROPERTIES.syntax": (
                "Syntax error in PROPERTIES"
                " (usually an extra/missing space/parenthesis)"),
@@ -228,8 +225,6 @@ qahelp = {
        "repo.eapi.deprecated": (
                "The ebuild uses an EAPI which is"
                " deprecated by the repository's metadata/layout.conf 
settings"),
-       "virtual.oldstyle": (
-               "The ebuild PROVIDEs an old-style virtual (see GLEP 37)"),
        "virtual.suspect": (
                "Ebuild contains a package"
                " that usually should be pulled via virtual/, not directly."),

diff --git a/repoman/pym/repoman/repos.py b/repoman/pym/repoman/repos.py
index e942a599e..6bf286002 100644
--- a/repoman/pym/repoman/repos.py
+++ b/repoman/pym/repoman/repos.py
@@ -60,9 +60,6 @@ class RepoSettings(object):
                        if repo.location not in 
self.repo_config.eclass_db.porttrees:
                                del self.repositories[repo.name]
 
-               if self.repo_config.allow_provide_virtual:
-                       qawarnings.add("virtual.oldstyle")
-
                if self.repo_config.sign_commit and options.mode in ("commit", 
"fix", "manifest"):
                        if vcs_settings.vcs:
                                func = getattr(self, '_vcs_gpg_%s' % 
vcs_settings.vcs)

Reply via email to