diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-04-05 20:05:31 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-04-05 20:21:58 +0900 |
commit | 1ce3a14db230f4e89b1d327ccb6e0949685ddc86 (patch) | |
tree | 8793fed6f58270fca89dc1e69510336da02c4009 | |
parent | de3601e3cdf6049b0f57f7e0ee4ccd2c5fd4d799 (diff) | |
download | building-blocks-1ce3a14db230f4e89b1d327ccb6e0949685ddc86.tar.gz building-blocks-1ce3a14db230f4e89b1d327ccb6e0949685ddc86.tar.bz2 building-blocks-1ce3a14db230f4e89b1d327ccb6e0949685ddc86.zip |
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 <myungjoo.ham@samsung.com>
-rwxr-xr-x | rule_checker.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |