summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2006-01-27 04:43:30 +0000
committerJason Stubbs <jstubbs@gentoo.org>2006-01-27 04:43:30 +0000
commit429292b73250c9df497da780cac9c633207f3e83 (patch)
tree95b40aff4c52112e205892561b1d925273374c0b
parent80815009ce2fa4fe35a260e95c595729b67b6a43 (diff)
downloadportage-429292b73250c9df497da780cac9c633207f3e83.tar.gz
portage-429292b73250c9df497da780cac9c633207f3e83.tar.bz2
portage-429292b73250c9df497da780cac9c633207f3e83.zip
Added a check for obsolete virtual/x11 usage in dependencies.
svn path=/main/trunk/; revision=2587
-rwxr-xr-xbin/repoman29
1 files changed, 28 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index 3b396f438..0e92c4f9b 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -136,7 +136,8 @@ qahelp={
"metadata.bad":"Bad metadata.xml files",
"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"
+ "virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
+ "usage.obsolete":"The ebuild makes use of an obsolete construct"
}
qacats = qahelp.keys()
@@ -660,6 +661,27 @@ else:
xmllint_capable=True
+def x11_deprecation_check(depstr):
+ if depstr.find("virtual/x11") == -1:
+ return False
+ depsplit = depstr.split()
+ ok_stack = []
+ ok = False
+ for token in depsplit:
+ if token == "(":
+ ok_stack.append(ok)
+ ok = False
+ elif token == ")":
+ ok = ok_stack.pop()
+ elif token == "||":
+ ok = True
+ else:
+ ok = False
+ if token.find("virtual/x11") != -1 and (not ok_stack or not ok_stack[-1]):
+ return True
+ return False
+
+
arch_caches={}
for x in scanlist:
#ebuilds and digests added to cvs respectively.
@@ -1027,6 +1049,11 @@ for x in scanlist:
badlicsyntax = badlicsyntax > 0
badprovsyntax = badprovsyntax > 0
+ if not baddepsyntax:
+ if x11_deprecation_check(" ".join([myaux["DEPEND"], myaux["RDEPEND"], myaux["PDEPEND"]])):
+ stats["usage.obsolete"] += 1
+ fails["usage.obsolete"].append("%s/%s.ebuild: not migrated to modular X" % (x, y))
+
for keyword,arch,groups in arches:
portage.groups=groups