mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
support: get prompts via official Kconfiglib APIs
These weren't available when gen-manual-lists.py was first written. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
aba6fa137a
commit
b4250efb2f
@ -99,7 +99,7 @@ def get_symbol_parents(item, root=None, enable_choice=False):
|
|||||||
if parent.is_menu():
|
if parent.is_menu():
|
||||||
parents.append(parent.get_title())
|
parents.append(parent.get_title())
|
||||||
elif enable_choice and parent.is_choice():
|
elif enable_choice and parent.is_choice():
|
||||||
parents.append(parent.prompts[0][0])
|
parents.append(parent.get_prompts()[0])
|
||||||
parent = parent.get_parent()
|
parent = parent.get_parent()
|
||||||
if isinstance(root, kconfiglib.Menu) or \
|
if isinstance(root, kconfiglib.Menu) or \
|
||||||
(enable_choice and isinstance(root, kconfiglib.Choice)):
|
(enable_choice and isinstance(root, kconfiglib.Choice)):
|
||||||
@ -234,9 +234,9 @@ class Buildroot:
|
|||||||
"""
|
"""
|
||||||
if not symbol.is_symbol():
|
if not symbol.is_symbol():
|
||||||
return False
|
return False
|
||||||
if type == 'real' and not symbol.prompts:
|
if type == 'real' and not symbol.get_prompts():
|
||||||
return False
|
return False
|
||||||
if type == 'virtual' and symbol.prompts:
|
if type == 'virtual' and symbol.get_prompts():
|
||||||
return False
|
return False
|
||||||
if not self.re_pkg_prefix.match(symbol.get_name()):
|
if not self.re_pkg_prefix.match(symbol.get_name()):
|
||||||
return False
|
return False
|
||||||
@ -315,7 +315,7 @@ class Buildroot:
|
|||||||
:param mark_deprecated: Append a 'deprecated' to the label
|
:param mark_deprecated: Append a 'deprecated' to the label
|
||||||
|
|
||||||
"""
|
"""
|
||||||
label = symbol.prompts[0][0]
|
label = symbol.get_prompts()[0]
|
||||||
if self._is_deprecated(symbol) and mark_deprecated:
|
if self._is_deprecated(symbol) and mark_deprecated:
|
||||||
label += " *(deprecated)*"
|
label += " *(deprecated)*"
|
||||||
return label
|
return label
|
||||||
@ -394,7 +394,7 @@ class Buildroot:
|
|||||||
continue
|
continue
|
||||||
for s in selects:
|
for s in selects:
|
||||||
if s == symbol:
|
if s == symbol:
|
||||||
if sym.prompts:
|
if sym.get_prompts():
|
||||||
l = self._get_symbol_label(sym,False)
|
l = self._get_symbol_label(sym,False)
|
||||||
parent_pkg = _get_parent_package(sym)
|
parent_pkg = _get_parent_package(sym)
|
||||||
if parent_pkg is not None:
|
if parent_pkg is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user