repoman: remove most old-style virtual checks
authorZac Medico <zmedico@gentoo.org>
Sun, 1 May 2011 16:30:36 +0000 (09:30 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 1 May 2011 16:30:36 +0000 (09:30 -0700)
PROVIDE virtuals have been banned from Gentoo's tree (see bug #365505),
so these checks aren't needed anymore. The PROVIDE.syntax check is kept
in the Package class since PROVIDE is still supported for backward
compatibility, and therefore invalid syntax can still have negative
effects. This check can be removed if/when backward compatibilty is
completely dropped.

bin/repoman
man/repoman.1
pym/_emerge/Package.py

index c89f2b8d499faad68961a4eba6ca4142408d90e6..ad620e2a67a20c8858568111160967ca56ebfc0a 100755 (executable)
@@ -367,9 +367,6 @@ qahelp={
        "metadata.warning":"Warnings in metadata.xml files",
        "portage.internal":"The ebuild uses an internal Portage function",
        "virtual.oldstyle":"The ebuild PROVIDEs an old-style virtual (see GLEP 37)",
-       "virtual.versioned":"PROVIDE contains virtuals with versions",
-       "virtual.exists":"PROVIDE contains existing package names",
-       "virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
        "usage.obsolete":"The ebuild makes use of an obsolete construct",
        "upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
 }
@@ -414,9 +411,6 @@ qawarnings = set((
 "wxwidgets.eclassnotused",
 "metadata.warning",
 "portage.internal",
-"virtual.versioned",
-"virtual.exists",
-"virtual.unavailable",
 "usage.obsolete",
 "upstream.workaround",
 "LIVEVCS.stable",
@@ -1523,32 +1517,6 @@ for x in scanlist:
                                        "%s: '%s' found in thirdpartymirrors" % \
                                        (relative_path, mirror))
 
-               try:
-                       provide = portage.dep.use_reduce(pkg.metadata['PROVIDE'],
-                               token_class=portage.dep.Atom, matchall=1, flat=True)
-               except portage.exception.InvalidDependString:
-                       stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
-                       fails["PROVIDE.syntax"].append("%s: %s" % \
-                               (relative_path, pkg.metadata['PROVIDE']))
-                       provide = []
-               provide_cps = []
-
-               # The Package class automatically evaluates USE conditionals.
-               for myprovide in provide:
-                       if not isinstance(myprovide, portage.dep.Atom):
-                               stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
-                               fails["PROVIDE.syntax"].append("%s: %s" % \
-                                       (relative_path, myprovide))
-                               continue
-                       prov_cp = myprovide.cp
-                       provide_cps.append(prov_cp)
-                       if prov_cp != myprovide:
-                               stats["virtual.versioned"]+=1
-                               fails["virtual.versioned"].append(x+"/"+y+".ebuild: "+myprovide)
-                       if portdb.cp_list(prov_cp):
-                               stats["virtual.exists"]+=1
-                               fails["virtual.exists"].append(x+"/"+y+".ebuild: "+prov_cp)
-
                if myaux.get("PROVIDE"):
                        stats["virtual.oldstyle"]+=1
                        fails["virtual.oldstyle"].append(relative_path)
@@ -1903,19 +1871,6 @@ for x in scanlist:
                                # just in case, prevent config.reset() from nuking these.
                                dep_settings.backup_changes("ACCEPT_KEYWORDS")
 
-                               if prof.sub_path:
-                                       # old-style virtuals currently aren't
-                                       # resolvable with empty profile, since
-                                       # mappings from 'virtuals' files are
-                                       # unavailable (it would be expensive to
-                                       # search for PROVIDE in all ebuilds)
-                                       for prov_cp in provide_cps:
-                                               if prov_cp not in dep_settings.getvirtuals():
-                                                       stats["virtual.unavailable"] += 1
-                                                       fails["virtual.unavailable"].append(
-                                                               "%s: %s(%s) %s" % (relative_path, keyword,
-                                                               prof.sub_path, prov_cp))
-
                                if not baddepsyntax:
                                        ismasked = not ebuild_archs or \
                                                pkg.cpv not in portdb.xmatch("list-visible", pkg.cp)
index 7c34024489e7bd0e2517d657d9c5a3b992f47a78..4bb50337ad299182b0439f1334beca7dd3fde838 100644 (file)
@@ -350,18 +350,9 @@ Assigning a readonly variable
 .B variable.usedwithhelpers
 Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
 .TP
-.B virtual.exists
-PROVIDE contains existing package names
-.TP
 .B virtual.oldstyle
 The ebuild PROVIDEs an old-style virtual (see GLEP 37)
 .TP
-.B virtual.unavailable
-PROVIDE contains a virtual which contains no profile default
-.TP
-.B virtual.versioned
-PROVIDE contains virtuals with versions
-.TP
 .B wxwidgets.eclassnotused
 Ebuild DEPENDs on x11-libs/wxGTK without inheriting wxwidgets.eclass. Refer to
 bug #305469 for more information.
index dcc6a0c465e6aa6606867120571ee7cb755fb776..2dfcc8502f72930f7ee6bb69e4d7e9313f5e48f2 100644 (file)
@@ -115,7 +115,8 @@ class Package(Task):
                                use_reduce(v, eapi=dep_eapi, matchall=True,
                                        is_valid_flag=dep_valid_flag, token_class=Atom)
                        except InvalidDependString as e:
-                               self._metadata_exception(k, e)
+                               self._invalid_metadata("PROVIDE.syntax",
+                                       _unicode_decode("%s: %s") % (k, e))
 
                for k in self._use_conditional_misc_keys:
                        v = self.metadata.get(k)