fix dependency check logic cause config always disabled master
authorLunaixsky <lunaixsky@qq.com>
Tue, 3 Jun 2025 12:16:42 +0000 (13:16 +0100)
committerLunaixsky <lunaixsky@qq.com>
Tue, 3 Jun 2025 12:21:16 +0000 (13:21 +0100)
fix incorrect term type of "use_graphic_device"
fix incorrect enablement checking in "dep" command output in shconfig

lunaix-os/hal/LConfig
lunaix-os/scripts/build-tools/lcfg2/nodes.py
lunaix-os/scripts/build-tools/shared/shconfig/commands.py

index 5b6a86f72b52c7bcc969b5641bae967009fa0109..ba3f40086d6062baa33976ea52e4ee143577a2ee 100644 (file)
@@ -31,8 +31,8 @@ def hal():
         return 256
     
     @"Graphic Devices"
-    def use_graphic_dev() -> int:
+    def use_graphic_dev() -> bool:
         """
             Support of graphical devices and display protocol
         """
-        return False
\ No newline at end of file
+        return False
index 3b423949d006859b17c2108d2595738603a2f028..da46005d94baf2bac0a1f0eaa9e710238548facd 100644 (file)
@@ -136,7 +136,7 @@ class ConfigNode:
         parent = NodeProperty.Parent[self]
 
         if isinstance(val, bool):
-            en = en and val
+            en = val
         
         if isinstance(parent, ConfigNode):
             en = en and parent.enabled()
index c6685647e08da5fe7b24553206c458a6a5404ee4..9b1a38f53c4849bd43921a343954ec515322ad64 100644 (file)
@@ -136,7 +136,7 @@ class Commands(CmdTable):
             indent = " "*inds
             dep: NodeDependency = NodeProperty.Dependency[node]
             
-            state = 'enabled' if NodeProperty.Value[node] else 'disabled'
+            state = 'enabled' if NodeProperty.Enabled[node] else 'disabled'
             print(f"{indent}* {node._name} (currently {state})")
             if dep is None:
                 return
@@ -212,4 +212,4 @@ class Commands(CmdTable):
 
         lines = self.__format_config_list(nodes)
 
-        pydoc.pager("\n".join(lines))
\ No newline at end of file
+        pydoc.pager("\n".join(lines))