Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: man/, bin/, pym/_emerge/
Date: Sun, 01 May 2011 16:32:31
Message-Id: df15d8c67d6c9d821a5fada0063c04da9bb2bed6.zmedico@gentoo
1 commit: df15d8c67d6c9d821a5fada0063c04da9bb2bed6
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 1 16:30:36 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun May 1 16:30:36 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=df15d8c6
7
8 repoman: remove most old-style virtual checks
9
10 PROVIDE virtuals have been banned from Gentoo's tree (see bug #365505),
11 so these checks aren't needed anymore. The PROVIDE.syntax check is kept
12 in the Package class since PROVIDE is still supported for backward
13 compatibility, and therefore invalid syntax can still have negative
14 effects. This check can be removed if/when backward compatibilty is
15 completely dropped.
16
17 ---
18 bin/repoman | 45 ---------------------------------------------
19 man/repoman.1 | 9 ---------
20 pym/_emerge/Package.py | 3 ++-
21 3 files changed, 2 insertions(+), 55 deletions(-)
22
23 diff --git a/bin/repoman b/bin/repoman
24 index c89f2b8..ad620e2 100755
25 --- a/bin/repoman
26 +++ b/bin/repoman
27 @@ -367,9 +367,6 @@ qahelp={
28 "metadata.warning":"Warnings in metadata.xml files",
29 "portage.internal":"The ebuild uses an internal Portage function",
30 "virtual.oldstyle":"The ebuild PROVIDEs an old-style virtual (see GLEP 37)",
31 - "virtual.versioned":"PROVIDE contains virtuals with versions",
32 - "virtual.exists":"PROVIDE contains existing package names",
33 - "virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
34 "usage.obsolete":"The ebuild makes use of an obsolete construct",
35 "upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
36 }
37 @@ -414,9 +411,6 @@ qawarnings = set((
38 "wxwidgets.eclassnotused",
39 "metadata.warning",
40 "portage.internal",
41 -"virtual.versioned",
42 -"virtual.exists",
43 -"virtual.unavailable",
44 "usage.obsolete",
45 "upstream.workaround",
46 "LIVEVCS.stable",
47 @@ -1523,32 +1517,6 @@ for x in scanlist:
48 "%s: '%s' found in thirdpartymirrors" % \
49 (relative_path, mirror))
50
51 - try:
52 - provide = portage.dep.use_reduce(pkg.metadata['PROVIDE'],
53 - token_class=portage.dep.Atom, matchall=1, flat=True)
54 - except portage.exception.InvalidDependString:
55 - stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
56 - fails["PROVIDE.syntax"].append("%s: %s" % \
57 - (relative_path, pkg.metadata['PROVIDE']))
58 - provide = []
59 - provide_cps = []
60 -
61 - # The Package class automatically evaluates USE conditionals.
62 - for myprovide in provide:
63 - if not isinstance(myprovide, portage.dep.Atom):
64 - stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
65 - fails["PROVIDE.syntax"].append("%s: %s" % \
66 - (relative_path, myprovide))
67 - continue
68 - prov_cp = myprovide.cp
69 - provide_cps.append(prov_cp)
70 - if prov_cp != myprovide:
71 - stats["virtual.versioned"]+=1
72 - fails["virtual.versioned"].append(x+"/"+y+".ebuild: "+myprovide)
73 - if portdb.cp_list(prov_cp):
74 - stats["virtual.exists"]+=1
75 - fails["virtual.exists"].append(x+"/"+y+".ebuild: "+prov_cp)
76 -
77 if myaux.get("PROVIDE"):
78 stats["virtual.oldstyle"]+=1
79 fails["virtual.oldstyle"].append(relative_path)
80 @@ -1903,19 +1871,6 @@ for x in scanlist:
81 # just in case, prevent config.reset() from nuking these.
82 dep_settings.backup_changes("ACCEPT_KEYWORDS")
83
84 - if prof.sub_path:
85 - # old-style virtuals currently aren't
86 - # resolvable with empty profile, since
87 - # mappings from 'virtuals' files are
88 - # unavailable (it would be expensive to
89 - # search for PROVIDE in all ebuilds)
90 - for prov_cp in provide_cps:
91 - if prov_cp not in dep_settings.getvirtuals():
92 - stats["virtual.unavailable"] += 1
93 - fails["virtual.unavailable"].append(
94 - "%s: %s(%s) %s" % (relative_path, keyword,
95 - prof.sub_path, prov_cp))
96 -
97 if not baddepsyntax:
98 ismasked = not ebuild_archs or \
99 pkg.cpv not in portdb.xmatch("list-visible", pkg.cp)
100
101 diff --git a/man/repoman.1 b/man/repoman.1
102 index 7c34024..4bb5033 100644
103 --- a/man/repoman.1
104 +++ b/man/repoman.1
105 @@ -350,18 +350,9 @@ Assigning a readonly variable
106 .B variable.usedwithhelpers
107 Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
108 .TP
109 -.B virtual.exists
110 -PROVIDE contains existing package names
111 -.TP
112 .B virtual.oldstyle
113 The ebuild PROVIDEs an old-style virtual (see GLEP 37)
114 .TP
115 -.B virtual.unavailable
116 -PROVIDE contains a virtual which contains no profile default
117 -.TP
118 -.B virtual.versioned
119 -PROVIDE contains virtuals with versions
120 -.TP
121 .B wxwidgets.eclassnotused
122 Ebuild DEPENDs on x11-libs/wxGTK without inheriting wxwidgets.eclass. Refer to
123 bug #305469 for more information.
124
125 diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
126 index dcc6a0c..2dfcc85 100644
127 --- a/pym/_emerge/Package.py
128 +++ b/pym/_emerge/Package.py
129 @@ -115,7 +115,8 @@ class Package(Task):
130 use_reduce(v, eapi=dep_eapi, matchall=True,
131 is_valid_flag=dep_valid_flag, token_class=Atom)
132 except InvalidDependString as e:
133 - self._metadata_exception(k, e)
134 + self._invalid_metadata("PROVIDE.syntax",
135 + _unicode_decode("%s: %s") % (k, e))
136
137 for k in self._use_conditional_misc_keys:
138 v = self.metadata.get(k)