pmb.helpers.ui: clarify "none" UI purpose

And suggest users to use "console" UI instead.
This commit is contained in:
Alexey Min 2021-12-10 20:49:33 +03:00
parent 89350b69b6
commit 66d11d6d34
No known key found for this signature in database
GPG Key ID: 0B19D2A65870B448
2 changed files with 8 additions and 3 deletions

View File

@ -12,7 +12,9 @@ def list(args, arch):
:param arch: device architecture, for which the UIs must be available
:returns: [("none", "No graphical..."), ("weston", "Wayland reference...")]
"""
ret = [("none", "No graphical environment")]
ret = [("none", "Bare minimum OS image for testing and manual"
" customization. The \"console\" UI should be selected if"
" a graphical UI is not desired.")]
for path in sorted(glob.glob(args.aports + "/main/postmarketos-ui-*")):
apkbuild = pmb.parse.apkbuild(f"{path}/APKBUILD")
ui = os.path.basename(path).split("-", 2)[2]

View File

@ -27,6 +27,9 @@ def test_helpers_ui(args):
so it must not be returned when querying the UI list for armhf. """
args.aports = f"{pmb_test.const.testdata}/helpers_ui/pmaports"
func = pmb.helpers.ui.list
assert func(args, "armhf") == [("none", "No graphical environment")]
assert func(args, "x86_64") == [("none", "No graphical environment"),
none_desc = "Bare minimum OS image for testing and manual" \
" customization. The \"console\" UI should be selected if" \
" a graphical UI is not desired."
assert func(args, "armhf") == [("none", none_desc)]
assert func(args, "x86_64") == [("none", none_desc),
("plasma-mobile", "cool pkgdesc")]