diff options
-rwxr-xr-x | bin/repoman | 29 |
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 |