other blocks to populate themselves with higher readability.
Refer to RULE 5-4.
+2.7. Do not refer to (or declare as a child) a block that does not exist
+ in this repository.
===========================================================================
%files sub1-domain_HAL-audio
+%package sub2-domain_HAL-audio-odroid
+Summary: HAL packages for Odroid AUdio
+%description sub2-domain_HAL-audio-odroid
+%files sub2-domain_HAL-audio-odroid
+
+%package sub2-domain_HAL-audio-TM2
+Summary: HAL packages for TM2 Audio
+%description sub2-domain_HAL-audio-TM2
+%files sub2-domain_HAL-audio-TM2
+
+%package sub2-domain_HAL-audio-TM1
+Summary: HAL packages for TM1 Audio
+%description sub2-domain_HAL-audio-TM1
+%files sub2-domain_HAL-audio-TM1
+
Tizen Bluetooth HAL domain
%files sub1-domain_HAL-bluetooth
+
+%package sub2-domain_HAL-bluetooth-TM2
+Summary: HAL packages for TM2 Bluetooth
+%description sub2-domain_HAL-bluetooth-TM2
+%files sub2-domain_HAL-bluetooth-TM2
+
+
+%package sub2-domain_HAL-bluetooth-TM1
+Summary: HAL packages for TM1 Bluetooth
+%description sub2-domain_HAL-bluetooth-TM1
+%files sub2-domain_HAL-bluetooth-TM1
+
+
# END
Summary: RPI3 Headless Network Hub
Requires: %{name}-sub2-Preset_iot-platforms-headless_minimal
Requires: %{name}-sub1-Preset_boards-RPI3_headlessBSP
-Requires: %{name}-root-network
+Requires: %{name}-root-domain_network
%description sub2-Preset_iot-examples-RPI3_headless_networkhub
%files sub2-Preset_iot-examples-RPI3_headless_networkhub
%endif
Block = collections.namedtuple('Block', 'name level parent children description files')
blocks = {}
+referedblock = []
def report(file, lc, code):
print(file + ":Line " + str(lc) + " |"+code)
def ruleCheckInterBlock():
global blocks
+ global referedblock
+
error = 0
warning = 0
root_suggested = {}
if found == 0:
error += 1
print("ERROR: Orphaned sub block. The block "+n+" is not registered at the parent block "+p+" although "+p+" exists.")
-
# TODO: Add more rules here?
+ # Check if Required/Suggested blocks exist in this repo
+ for refered in referedblock:
+ if not refered in blocks:
+ error += 1
+ print("ERROR: A nonexisting block '"+refered+"' is refered.")
+
+
+
+
return (error, warning)
def ruleCheckInc(file):
global blocks
+ global referedblock
print_v("Checking "+file)
report(file, lc, line)
continue
+ referedblock.append(cname[5:].strip())
+
cs = blocks[n].children
cs.append(c)
blocks[n]._replace(children = cs)