From 7099ed94c48d29f756d3d0c33c391f24b34c33c4 Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Mon, 26 Apr 2010 10:16:19 +0200 Subject: [PATCH 1/2] Add check to repoman ( P not SRC_URI). --- pym/repoman/checks.py | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 23f1267..d7e93f5 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -436,6 +436,14 @@ class BuiltWithUse(LineCheck): re = re.compile('^.*built_with_use') error = errors.BUILT_WITH_USE +class PNotInSourceUri(LineCheck): + def new(self, pkg): + src_uri_head = '\A\s*SRC_URI\s*=\s*".*' + src_uri_tail = '.*"\s*\#?.*\Z' + pv = pkg.cpv_split[1] + '.' + pkg.cpv_split[2] + self.re = re.compile(src_uri_head + pv + src_uri_tail, re.I) + self.error = "SRC_URI contains something really similar to expanded value of $P." + # EAPI-3 checks class Eapi3DeprecatedFuncs(LineCheck): repoman_check_name = 'EAPI.deprecated' @@ -496,7 +504,7 @@ _constant_checks = tuple((c() for c in ( EbuildPatches, EbuildQuotedA, EapiDefinition, IUseUndefined, InheritAutotools, EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded, - DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, + DeprecatedBindnowFlags,PNotInSourceUri, SrcUnpackPatches, WantAutoDefaultValue, SrcCompileEconf, Eapi3DeprecatedFuncs, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse))) -- 1.7.0.4