Change-Id: I67f55b495fcc864cfb54d3d202cb2ed9f4585e8a
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
# To get .ks files
BuildRequires: image-configurations
+# To check the rules
+BuildRequires: python
+
# Root Domains
Suggests: %{name}-root-Kernel
Suggests: %{name}-root-SystemFW
end \
end}}
+%prep
+%setup
%build
-ls /usr/share/image-configurations/
+# rule_checker returns non-zero if there is an error in *.inc, breaking the build
+python ./rule_checker.py
%files
error += 1
print("ERROR: RULE 1.1 to ensure 1.1, do not use -n option in package name")
+ # Implicit / General Rule
+ if re.search('^\s*%package\s', line, re.IGNORECASE) and not re.search('^\s*%package\s', line):
+ error += 1
+ print('ERROR: (General) Please use %package, not '+re.search('^%package'))
+
# RULE 1-3
if re.search('^\s*%package', line) and not re.search('^\s*%package\s*(root)|(sub1)|(sub2)', line):
error +=1