summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RULES10
-rw-r--r--packaging/platform-preset-boards.inc1
-rwxr-xr-xrule_checker.py15
3 files changed, 26 insertions, 0 deletions
diff --git a/RULES b/RULES
index ee6bd69..bad631f 100644
--- a/RULES
+++ b/RULES
@@ -126,3 +126,13 @@ or packages, but is used to provide UI elements in TIC.
HT or ht: HTML tags from summary text is used. (same with SM/sm...)
5.6. Blocks in TIC are placed sorted by package name. (ascending order)
+
+5.7. If the first line of %description starts with __KS_URL__, it denotes for
+the model ks file URL to be interpreted by TIC.
+
+ 5.7.1. Only platform-preset-boards may use such keywords
+ 5.7.2. Only one package with such keyword is effective. If there are two packages
+ with such keywords are chosen simultaneously, the behavior is "undefined".
+ 5.7.3. The section of "%packages" in the linked ks file is ignored.
+ 5.7.4. If the URL points to a directory index, any ks file in the directory can be
+ used. (ending with /)
diff --git a/packaging/platform-preset-boards.inc b/packaging/platform-preset-boards.inc
index 5660ab6..9cfeec2 100644
--- a/packaging/platform-preset-boards.inc
+++ b/packaging/platform-preset-boards.inc
@@ -46,6 +46,7 @@ Conflicts: %{name}-sub1-Preset_boards-TW1_fullBSP
Conflicts: %{name}-sub1-Preset_boards-TW2_fullBSP
%description sub1-Preset_boards-RPI3_headlessBSP
+__KS_URL__: http://download.tizen.org/snapshots/tizen/unified/latest/images/standard/common-headless-2parts-armv7l-rpi3/
These are manually extracted from common-headless-2parts-armv7l-rpi3.ks
%files sub1-Preset_boards-RPI3_headlessBSP
%endif
diff --git a/rule_checker.py b/rule_checker.py
index 953c017..fc15901 100755
--- a/rule_checker.py
+++ b/rule_checker.py
@@ -100,7 +100,9 @@ def ruleCheckInc(file):
files = 0 # Start checking if %files section have files (error if exists)
lastpkg = ''
+ descpkg = ''
uipkg_checking = 0 # 1 if we are in a context of uipkg (after %package, before %description/%files/...)
+ description = 0 # 1 if it is next line of description
try:
f = open("packaging/"+file, 'r')
@@ -111,6 +113,18 @@ def ruleCheckInc(file):
for line in f:
lc += 1
+ # RULE 5.7
+ if description == 1:
+ description = 0
+ if re.search(r'^__KS_URL__', line):
+ if not re.search(r'Preset_boards-', descpkg):
+ error += 1
+ print("ERROR: Rule 5.7.1. The package: "+descpkg)
+ report(file, lc, line)
+ continue
+ if re.search(r'^\s*%description', line):
+ description = 1
+
if (files == 1):
if re.search(r'^\s*(%package)|(%build)|(%description)|(%prep)|(%clean)|(%install)|(%post)|(%pre)', line):
files = 0
@@ -308,6 +322,7 @@ def ruleCheckInc(file):
# Check for %description entry
if re.search(r'^\s*%description\s+', line):
+ descpkg = lastpkg
lastpkg = ''
# remove tag