diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-04-12 19:54:51 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-04-13 13:17:32 +0900 |
commit | cb6e6c8efe9e33462443ad88320d645b545c5d31 (patch) | |
tree | fec7665e44cf5ebd80c6328ba1ac709ce471750d | |
parent | b4db6c19b2a26fc996d271108dd35f6b9db2b9cf (diff) | |
download | building-blocks-cb6e6c8efe9e33462443ad88320d645b545c5d31.tar.gz building-blocks-cb6e6c8efe9e33462443ad88320d645b545c5d31.tar.bz2 building-blocks-cb6e6c8efe9e33462443ad88320d645b545c5d31.zip |
RULE: UI Block Rule
Next version of TIC supports UI blocks.
RULES for such UI blocks are described.
Before SR'ing this, TIC-Core should merge
https://review.tizen.org/gerrit/#/c/124779/
Change-Id: I55a11b5c7df4424f6a003c6f22d0f245159f967d
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | RULES | 17 | ||||
-rw-r--r-- | packaging/platform-preset-iot.inc | 77 | ||||
-rwxr-xr-x | rule_checker.py | 11 |
3 files changed, 75 insertions, 30 deletions
@@ -109,3 +109,20 @@ another block that is not a direct child of it (ref. RULE 2.6) E.g., sub2-* cannot Requires/Suggests another root/sub1/sub2 E.g., sub1-A cannot Requires/Suggests sub2-B-X + +5.5. A UI Block is a block that cannot be chosen or have relation with other blocks +or packages, but is used to provide UI elements in TIC. + + 5.5.1. A UI Block has the same naming rule with others. + 5.5.2. A block becomes a UI block if it satisfies the following regex: + /__UI__..$/ + 5.5.3. The last two characters (.. in the regex above) are "tag" that consists of + the placement of the block. + 5.5.3.1. Tags are: + BR or br: blank line + HR or hr: <hr> + SD or sd: shaded blank line + SM or sm: summary text is shown (HTML tags works) + 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) diff --git a/packaging/platform-preset-iot.inc b/packaging/platform-preset-iot.inc index f2e9ffc..1444882 100644 --- a/packaging/platform-preset-iot.inc +++ b/packaging/platform-preset-iot.inc @@ -26,22 +26,39 @@ Tizen IoT Presets of Software Plaforms independent from specific hardware/BSPs. %package sub1-Preset_iot-examples Summary: IOT Device Board and SW Platform Presets -%ifarch aarch64 armv7l -Suggests: %{name}-sub2-Preset_iot-examples-RPI3_headless_devboard -Suggests: %{name}-sub2-Preset_iot-examples-RPI3_headless_networkhub -Suggests: %{name}-sub2-Preset_iot-examples-RPI3_headless_minimal -Suggests: %{name}-sub2-Preset_iot-examples-RPI3_headless -%endif %ifarch armv7l -Suggests: %{name}-sub2-Preset_iot-examples-ARTIK_headless -Suggests: %{name}-sub2-Preset_iot-examples-ARTIK_headed_full -Suggests: %{name}-sub2-Preset_iot-examples-ODROID_headed_full +Suggests: %{name}-sub2-Preset_iot-examples-1_AAA_BLANK1__UI__SM +Suggests: %{name}-sub2-Preset_iot-examples-1_ARTIK_headless +Suggests: %{name}-sub2-Preset_iot-examples-1_ARTIK_headed_full +Suggests: %{name}-sub2-Preset_iot-examples-1_ODROID_headed_full +%endif +Suggests: %{name}-sub2-Preset_iot-examples-1_ZZZBLANK1__UI__HR +Suggests: %{name}-sub2-Preset_iot-examples-1_ZZZBLANK2__UI__SM +%ifarch aarch64 armv7l +Suggests: %{name}-sub2-Preset_iot-examples-1_RPI3_headless +Suggests: %{name}-sub2-Preset_iot-examples-3_RPI3_headless_devboard +Suggests: %{name}-sub2-Preset_iot-examples-3_RPI3_headless_networkhub +Suggests: %{name}-sub2-Preset_iot-examples-3_RPI3_headless_minimal %endif %description sub1-Preset_iot-examples Tizen IoT Presets of specific devices, which have both BSPs and software platforms. An item in this section is intended to represent a whole OS image. %files sub1-Preset_iot-examples +%package sub2-Preset_iot-examples-1_AAA_BLANK1__UI__SM +Summary: <b>Examples of Official Tizen Snapshot Images</b> +%description sub2-Preset_iot-examples-1_AAA_BLANK1__UI__SM +%files sub2-Preset_iot-examples-1_AAA_BLANK1__UI__SM + +%package sub2-Preset_iot-examples-1_ZZZBLANK1__UI__HR +Summary: UI Blank +%description sub2-Preset_iot-examples-1_ZZZBLANK1__UI__HR +%files sub2-Preset_iot-examples-1_ZZZBLANK1__UI__HR + +%package sub2-Preset_iot-examples-1_ZZZBLANK2__UI__SM +Summary: <b>Examples Not Verified</b> +%description sub2-Preset_iot-examples-1_ZZZBLANK2__UI__SM +%files sub2-Preset_iot-examples-1_ZZZBLANK2__UI__SM %package sub2-Preset_iot-platforms-headless_minimal @@ -69,7 +86,7 @@ Tizen IoT Headed/Minimal Preset %ifarch aarch64 armv7l -%package sub2-Preset_iot-examples-RPI3_headless_devboard +%package sub2-Preset_iot-examples-3_RPI3_headless_devboard Summary: RPI3 Headless for Developers Requires: %{name}-sub2-Preset_iot-platforms-headless_minimal Requires: %{name}-sub1-Preset_boards-RPI3_headlessBSP @@ -77,69 +94,69 @@ Requires: rpm Suggests: gcc Suggests: make Suggests: cmake -%description sub2-Preset_iot-examples-RPI3_headless_devboard -%files sub2-Preset_iot-examples-RPI3_headless_devboard +%description sub2-Preset_iot-examples-3_RPI3_headless_devboard +%files sub2-Preset_iot-examples-3_RPI3_headless_devboard %endif %ifarch aarch64 armv7l -%package sub2-Preset_iot-examples-RPI3_headless_networkhub +%package sub2-Preset_iot-examples-3_RPI3_headless_networkhub Summary: RPI3 Headless Network Hub Requires: %{name}-sub2-Preset_iot-platforms-headless_minimal Requires: %{name}-sub1-Preset_boards-RPI3_headlessBSP Requires: %{name}-root-domain_network -%description sub2-Preset_iot-examples-RPI3_headless_networkhub -%files sub2-Preset_iot-examples-RPI3_headless_networkhub +%description sub2-Preset_iot-examples-3_RPI3_headless_networkhub +%files sub2-Preset_iot-examples-3_RPI3_headless_networkhub %endif %ifarch aarch64 armv7l -%package sub2-Preset_iot-examples-RPI3_headless_minimal +%package sub2-Preset_iot-examples-3_RPI3_headless_minimal Summary: RPI3 Minimal Headless Requires: %{name}-sub2-Preset_iot-platforms-headless_minimal Requires: %{name}-sub1-Preset_boards-RPI3_headlessBSP -%description sub2-Preset_iot-examples-RPI3_headless_minimal -%files sub2-Preset_iot-examples-RPI3_headless_minimal +%description sub2-Preset_iot-examples-3_RPI3_headless_minimal +%files sub2-Preset_iot-examples-3_RPI3_headless_minimal %endif %ifarch aarch64 armv7l -%package sub2-Preset_iot-examples-RPI3_headless +%package sub2-Preset_iot-examples-1_RPI3_headless Summary: RPI3 Headless Tizen Official Example %list_with_require %{_datadir}/image-configurations/common-headless-2parts-armv7l-rpi3.ks -%description sub2-Preset_iot-examples-RPI3_headless +%description sub2-Preset_iot-examples-1_RPI3_headless Replication of Tizen IoT RPI3 Snapshot Release (download.tizen.org/snapshots/tizen/unified) This is from common-headless-2parts-armv7l-rpi3. (armv7l) Userspace rootfs only. -%files sub2-Preset_iot-examples-RPI3_headless +%files sub2-Preset_iot-examples-1_RPI3_headless %endif %ifarch armv7l -%package sub2-Preset_iot-examples-ARTIK_headless +%package sub2-Preset_iot-examples-1_ARTIK_headless Summary: ARTIK Headless Tizen Official Example %list_with_require %{_datadir}/image-configurations/common-headless-3parts-armv7l-artik.ks -%description sub2-Preset_iot-examples-ARTIK_headless +%description sub2-Preset_iot-examples-1_ARTIK_headless Replication of Tizen IoT ARTIK Snapshot Release (download.tizen.org/snapshots/tizen/unified) This is from common-headless-3parts-armv7l-artik. (armv7l) Userspace rootfs only -%files sub2-Preset_iot-examples-ARTIK_headless +%files sub2-Preset_iot-examples-1_ARTIK_headless %endif %ifarch armv7l -%package sub2-Preset_iot-examples-ARTIK_headed_full +%package sub2-Preset_iot-examples-1_ARTIK_headed_full Summary: ARTIK Headed Tizen Official Example (common/full) %list_with_require %{_datadir}/image-configurations/common-wayland-3parts-armv7l-artik.ks -%description sub2-Preset_iot-examples-ARTIK_headed_full +%description sub2-Preset_iot-examples-1_ARTIK_headed_full Replication of Tizen IoT ARTIK Headed/Wayland Snapshot Release (download.tizen.org/snapshots/tizen/unified) This is from common-wayland-3parts-armv7l-artik. (armv7l) Userspace rootfs only -%files sub2-Preset_iot-examples-ARTIK_headed_full +%files sub2-Preset_iot-examples-1_ARTIK_headed_full %endif %ifarch armv7l -%package sub2-Preset_iot-examples-ODROID_headed_full +%package sub2-Preset_iot-examples-1_ODROID_headed_full Summary: ODROID U3/XU3 Headed Tizen Official Example (common/full) %list_with_require %{_datadir}/image-configurations/common-wayland-3parts-armv7l-odroidu3.ks -%description sub2-Preset_iot-examples-ODROID_headed_full +%description sub2-Preset_iot-examples-1_ODROID_headed_full Replication of Tizen IoT Odroid U3/XU3 Headed/Wayland Snapshot Release (download.tizen.org/snapshots/tizen/unified) This is from common-wayland-3parts-armv7l-odroidu3. (armv7l) Userspace rootfs only -%files sub2-Preset_iot-examples-ODROID_headed_full +%files sub2-Preset_iot-examples-1_ODROID_headed_full %endif diff --git a/rule_checker.py b/rule_checker.py index c29e116..953c017 100755 --- a/rule_checker.py +++ b/rule_checker.py @@ -100,6 +100,7 @@ def ruleCheckInc(file): files = 0 # Start checking if %files section have files (error if exists) lastpkg = '' + uipkg_checking = 0 # 1 if we are in a context of uipkg (after %package, before %description/%files/...) try: f = open("packaging/"+file, 'r') @@ -113,6 +114,7 @@ def ruleCheckInc(file): if (files == 1): if re.search(r'^\s*(%package)|(%build)|(%description)|(%prep)|(%clean)|(%install)|(%post)|(%pre)', line): files = 0 + uipkg_checking = 0 else: if re.search(r'^\s*[^#\s]+', line) and \ not re.search(r'^\s*(%include)|(%endif)|(%ifarch)|(%list_require)', line): @@ -122,6 +124,13 @@ def ruleCheckInc(file): continue if re.search(r'^\s*((Suggests)|(Requires))', line, re.IGNORECASE): + # RULE 5.5 + if uipkg_checking == 1: + error += 1 + print("ERROR: RULE 5.5 a UI block cannot have relation with others.") + report(file, lc, line) + continue + if not re.search(r'^\s*((Suggests)|(Requires)):', line): error += 1 print("ERROR: Use case sensitive put : directly after the keyword") @@ -224,6 +233,8 @@ def ruleCheckInc(file): print("ERROR: RULE 1.3 the send prefix should be root, sub1, sub2, or sub3.") report(file, lc, line) continue + if re.search(r'^.*__UI__..$', line): + uipkg_checking = 1 # RULE 1-9 for root block (1-5) if re.search(r'^\s*%package\s*root', line) and \ |