"ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully",
"ebuild.minorsyn":"This ebuild has a minor syntax error that contravenes gentoo coding style",
"ebuild.badheader":"This ebuild has a malformed header",
+ "eprefixify.defined":"The ebuild uses eprefixify, but does not inherit the prefix eclass",
"manifest.bad":"Manifest has missing or incorrect digests",
"metadata.missing":"Missing metadata.xml files",
"metadata.bad":"Bad metadata.xml files",
if match:
return "Quoted \"${A}\" on line: %d"
+class EprefixifyDefined(LineCheck):
+ """ Check that prefix.eclass is inherited if needed"""
+
+ repoman_check_name = 'eprefixify.defined'
+
+ _eprefixify_re = re.compile(r'\beprefixify\b')
+ _inherit_prefix_re = re.compile(r'^\s*inherit\s(.*\s)?prefix\b')
+
+ def new(self, pkg):
+ self._prefix_inherited = False
+
+ def check(self, num, line):
+ if self._eprefixify_re.search(line) is not None:
+ if not self._prefix_inherited:
+ return errors.EPREFIXIFY_MISSING_INHERIT
+ elif self._inherit_prefix_re.search(line) is not None:
+ self._prefix_inherited = True
+
class InheritAutotools(LineCheck):
"""
Make sure appropriate functions are called in
EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote,
EbuildAssignment, Eapi3EbuildAssignment, EbuildUselessDodoc,
EbuildUselessCdS, EbuildNestedDie,
- EbuildPatches, EbuildQuotedA, EapiDefinition,
+ EbuildPatches, EbuildQuotedA, EapiDefinition, EprefixifyDefined,
IUseUndefined, InheritAutotools,
EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded,
DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue,