summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-02-09 03:41:02 +0000
committerZac Medico <zmedico@gentoo.org>2010-02-09 03:41:02 +0000
commit4734721c1b882ec4fdc004cd0d0490d31b3b31c1 (patch)
tree85beaa8bdb9d5d40e9acb830d51a639320f6088a /bin/repoman
parentUse cpv_getkey() instead of dep_getkey() where appropriate. (diff)
downloadportage-idfetch-4734721c1b882ec4fdc004cd0d0490d31b3b31c1.tar.gz
portage-idfetch-4734721c1b882ec4fdc004cd0d0490d31b3b31c1.tar.bz2
portage-idfetch-4734721c1b882ec4fdc004cd0d0490d31b3b31c1.zip
Use Atom.cp instead of dep_getkey(), and use cpv_getkey() instead of
dep_getkey() where appropriate. svn path=/main/trunk/; revision=15330
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman28
1 files changed, 19 insertions, 9 deletions
diff --git a/bin/repoman b/bin/repoman
index 0253511a..92f9cc1b 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -677,7 +677,7 @@ repoman_settings.backup_changes('PORTAGE_ARCHLIST')
global_pmasklines = portage.util.stack_lists(global_pmasklines, incremental=1)
global_pmaskdict = {}
for x in global_pmasklines:
- global_pmaskdict.setdefault(portage.dep_getkey(x), []).append(x)
+ global_pmaskdict.setdefault(x.cp, []).append(x)
del global_pmasklines
def has_global_mask(pkg):
@@ -1396,14 +1396,25 @@ for x in scanlist:
"%s: '%s' found in thirdpartymirrors" % \
(relative_path, mirror))
+ provide = portage.flatten(portage.dep.use_reduce(
+ portage.dep.paren_reduce(pkg.metadata['PROVIDE']), matchall=1))
+ provide_cps = []
+
# The Package class automatically evaluates USE conditionals.
- for myprovide in portage.flatten(portage.dep.use_reduce(
- portage.dep.paren_reduce(pkg.metadata['PROVIDE']), matchall=1)):
- prov_cp = portage.dep_getkey(myprovide)
+ for myprovide in provide:
+ try:
+ myprovide = portage.dep.Atom(myprovide)
+ except portage.exception.InvalidAtom:
+ 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)
- prov_pkg = portage.dep_getkey(
+ prov_pkg = portage.cpv_getkey(
portage.best(portdb.xmatch("match-all", prov_cp)))
if prov_cp == prov_pkg:
stats["virtual.exists"]+=1
@@ -1584,12 +1595,12 @@ for x in scanlist:
if mytype == "DEPEND" and \
not is_blocker and \
not inherited_java_eclass and \
- portage.dep_getkey(atom) == "virtual/jdk":
+ atom.cp == "virtual/jdk":
stats['java.eclassesnotused'] += 1
fails['java.eclassesnotused'].append(relative_path)
elif mytype in ("PDEPEND", "RDEPEND"):
if not is_blocker and \
- portage.dep_getkey(atom) in suspect_rdepend:
+ atom.cp in suspect_rdepend:
stats[mytype + '.suspect'] += 1
fails[mytype + '.suspect'].append(
relative_path + ": '%s'" % atom)
@@ -1777,8 +1788,7 @@ for x in scanlist:
# just in case, prevent config.reset() from nuking these.
dep_settings.backup_changes("ACCEPT_KEYWORDS")
- for myprovide in myaux["PROVIDE"].split():
- prov_cp = portage.dep_getkey(myprovide)
+ 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" % \