repoman: tighten regex for useq and hasq
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 08:07:51 +0000 (01:07 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 08:07:51 +0000 (01:07 -0700)
pym/repoman/checks.py

index 58ac20df00741f2a5e1e604e80a72104720d815e..e7472df721d196488d90ddf31de9f3c5329e6a3e 100644 (file)
@@ -587,19 +587,19 @@ class SrcUnpackPatches(PhaseCheck):
 
 class BuiltWithUse(LineCheck):
        repoman_check_name = 'ebuild.minorsyn'
-       re = re.compile('^.*built_with_use')
+       re = re.compile(r'(^|.*\b)built_with_use\b')
        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')
+       re = re.compile(r'(^|.*\b)useq\b')
        error = errors.USEQ_ERROR
 
 class DeprecatedHasq(LineCheck):
        """Checks for use of the deprecated hasq function"""
        repoman_check_name = 'ebuild.minorsyn'
-       re = re.compile('^.*hasq')
+       re = re.compile(r'(^|.*\b)hasq\b')
        error = errors.HASQ_ERROR
 
 # EAPI-3 checks