From de32b0d92ee28965c137bea637cddf6d8c0679c2 Mon Sep 17 00:00:00 2001 From: Dane Smith Date: Fri, 8 Jul 2011 00:12:33 -0700 Subject: [PATCH] repoman: check for deprecated useq and hasq calls --- pym/repoman/checks.py | 15 ++++++++++++++- pym/repoman/errors.py | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index c9ada5fbb..fabf0b3fb 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -586,6 +586,18 @@ class BuiltWithUse(LineCheck): re = re.compile('^.*built_with_use') error = errors.BUILT_WITH_USE +class DeprecatedUseq(LineCheck): + """Checks for use of the deprecated useq function""" + repoman_check_name = 'ebuild.minorsyn' + re = re.compile('^.*useq') + error = errors.USEQ_ERROR + +class DeprecatedHasq(LineCheck): + """Checks for use of the deprecated hasq function""" + repoman_check_name = 'ebuild.minorsyn' + re = re.compile('^.*hasq') + error = errors.HASQ_ERROR + # EAPI-3 checks class Eapi3DeprecatedFuncs(LineCheck): repoman_check_name = 'EAPI.deprecated' @@ -651,7 +663,8 @@ _constant_checks = tuple((c() for c in ( DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, SrcCompileEconf, Eapi3DeprecatedFuncs, NoOffsetWithHelpers, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse, - PreserveOldLib, SandboxAddpredict, PortageInternal))) + PreserveOldLib, SandboxAddpredict, PortageInternal, + DeprecatedUseq, DeprecatedHasq))) _here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py index a19e8c5c0..320924316 100644 --- a/pym/repoman/errors.py +++ b/pym/repoman/errors.py @@ -22,3 +22,5 @@ BUILT_WITH_USE = 'built_with_use on line: %d' EPREFIXIFY_MISSING_INHERIT = "prefix.eclass is not inherited, but eprefixify is used on line: %d" NO_OFFSET_WITH_HELPERS = "Helper function is used with D, ROOT, ED, EROOT or EPREFIX on line :%d" SANDBOX_ADDPREDICT = 'Ebuild calls addpredict on line: %d' +USEQ_ERROR = 'Ebuild calls deprecated useq function on line: %d' +HASQ_ERROR = 'Ebuild calls deprecated hasq function on line: %d' -- 2.26.2