summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-04-13 13:24:02 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-04-13 14:21:16 +0900
commitf8e03a3cf7da35a9b2815d245fd0b02fd808d301 (patch)
tree7b2f72955fc1346c0db1deef855903eb822bd6e1
parentcb6e6c8efe9e33462443ad88320d645b545c5d31 (diff)
downloadbuilding-blocks-f8e03a3cf7da35a9b2815d245fd0b02fd808d301.tar.gz
building-blocks-f8e03a3cf7da35a9b2815d245fd0b02fd808d301.tar.bz2
building-blocks-f8e03a3cf7da35a9b2815d245fd0b02fd808d301.zip
RULE: a board package may include KS construction infomation
An example is given with Preset_boards-RPI3_headlessBSP Added RULE 5.7. Added rulechecker for RULE 5.7. NOTE: TIC/TIC-Core update for KS Construction is in progress (will send the commit today or tomorrow) Change-Id: Iaf9b00c9704cb6e62f1b82447171a0acb070e33d Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-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