Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 379491
Collapse All | Expand All

(-)a/pym/repoman/checks.py (+29 lines)
Lines 731-736 class DeprecatedHasq(LineCheck): Link Here
731
	re = re.compile(r'(^|.*\b)hasq\b')
731
	re = re.compile(r'(^|.*\b)hasq\b')
732
	error = errors.HASQ_ERROR
732
	error = errors.HASQ_ERROR
733
733
734
# EAPI <2 checks
735
class Eapi01UndefinedPhases(LineCheck):
736
	repoman_check_name = 'EAPI.incompatible'
737
	src_configprepare_re = re.compile(r'\s*src_(configure|prepare)\s*\(\)')
738
739
	def check_eapi(self, eapi):
740
		return eapi in ('0', '1')
741
742
	def check(self, num, line):
743
		m = self.src_configprepare__re.match(line)
744
		if m is not None:
745
			return ("%s" % m.group(1)) + \
746
				" phase is not defined in EAPI=0/1 on line: %d"
747
748
734
# EAPI-3 checks
749
# EAPI-3 checks
735
class Eapi3DeprecatedFuncs(LineCheck):
750
class Eapi3DeprecatedFuncs(LineCheck):
736
	repoman_check_name = 'EAPI.deprecated'
751
	repoman_check_name = 'EAPI.deprecated'
Lines 745-750 class Eapi3DeprecatedFuncs(LineCheck): Link Here
745
			return ("'%s'" % m.group(1)) + \
760
			return ("'%s'" % m.group(1)) + \
746
				" has been deprecated in EAPI=3 on line: %d"
761
				" has been deprecated in EAPI=3 on line: %d"
747
762
763
# EAPI <4 checks
764
class Eapi0123UndefinedPhases(LineCheck):
765
	repoman_check_name = 'EAPI.incompatible'
766
	pkg_pretend_re = re.compile(r'\s*pkg_pretend\s*\(\)')
767
768
	def check_eapi(self, eapi):
769
		return eapi in ('0', '1', '2', '3')
770
771
	def check(self, num, line):
772
		m = self.pkg_pretend_re.match(line)
773
		if m is not None:
774
			return ("%s" % m.group(1)) + \
775
				" phase is not defined in EAPI < 4 on line: %d"
776
748
# EAPI-4 checks
777
# EAPI-4 checks
749
class Eapi4IncompatibleFuncs(LineCheck):
778
class Eapi4IncompatibleFuncs(LineCheck):
750
	repoman_check_name = 'EAPI.incompatible'
779
	repoman_check_name = 'EAPI.incompatible'

Return to bug 379491