From: MyungJoo Ham Date: Wed, 5 Apr 2017 11:05:31 +0000 (+0900) Subject: RULE: skip checking on requiring/suggesting packages X-Git-Tag: submit/tizen/20170406.050031~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ce3a14db230f4e89b1d327ccb6e0949685ddc86;p=tools%2Fbuilding-blocks.git RULE: skip checking on requiring/suggesting packages 1. If the target is non-block packages, we do not need to check them. 2. Corrected error message. Change-Id: If8e8655d54758807c201f0e28541850e4372e1d7 Signed-off-by: MyungJoo Ham --- diff --git a/rule_checker.py b/rule_checker.py index 5e7be0a..eaa574f 100755 --- a/rule_checker.py +++ b/rule_checker.py @@ -48,7 +48,7 @@ def ruleCheckInterBlock(): if blocks[n].level == 0: if not n in root_suggested: error += 1 - print("ERROR: Orphaned root block. Add Suggests: %{name}-root-"+n+" at building-blocks.spec") + print("ERROR: Orphaned root block. Add Suggests: %{name}-root-"+n+" at building-blocks.spec or in its categories.") else: # subX p = blocks[n].parent if not p in blocks: @@ -116,6 +116,10 @@ def ruleCheckInc(file): report(file, lc, line) continue else: + # If it's just a package, skip checking. + c = re.sub(r'^\s*((Suggests)|(Requires)):\s*%{name}-', r'', line) + if c == line: + continue c = re.sub(r'^\s*((Suggests)|(Requires)):\s*%{name}-sub[12]-', r'', line) c = re.sub(r'\s*', r'', c) c = re.sub(r'\n', r'', c)