Support pmb:systemd-never option (MR 2273)
For UI packages that have pmb:systemd-never set: * do not ask in "pmbootstrap init" whether to use systemd or not * do not install systemd, even if the systemd option is set to "always" The point of this is to not add maintenance burden to Sxmo (and possibly other UIs who not wish to support systemd with postmarketOS), so users don't install with this unsupported use case and report issues with it.
This commit is contained in:
parent
ed9f70739a
commit
bfc64d1cb8
|
@ -796,6 +796,7 @@ apkbuild_custom_valid_options = [
|
|||
"pmb:gpu-accel",
|
||||
"pmb:strict",
|
||||
"pmb:systemd",
|
||||
"pmb:systemd-never",
|
||||
]
|
||||
|
||||
# Variables from deviceinfo. Reference: <https://postmarketos.org/deviceinfo>
|
||||
|
|
|
@ -193,6 +193,11 @@ def ask_for_systemd(args, ui):
|
|||
if "systemd" not in pmb.config.pmaports.read_config_repos(args):
|
||||
return args.systemd
|
||||
|
||||
if pmb.helpers.ui.check_option(args, ui, "pmb:systemd-never"):
|
||||
logging.info("Based on your UI selection, OpenRC will be used as init"
|
||||
" system. This UI does not support systemd.")
|
||||
return args.systemd
|
||||
|
||||
default_is_systemd = pmb.helpers.ui.check_option(args, ui, "pmb:systemd")
|
||||
not_str = " " if default_is_systemd else " not "
|
||||
logging.info("Based on your UI selection, 'default' will result"
|
||||
|
|
|
@ -4,6 +4,8 @@ import pmb.helpers.ui
|
|||
|
||||
|
||||
def is_systemd_selected(args):
|
||||
if pmb.helpers.ui.check_option(args, args.ui, "pmb:systemd-never"):
|
||||
return False
|
||||
if args.systemd == "always":
|
||||
return True
|
||||
if args.systemd == "never":
|
||||
|
|
Loading…
Reference in New Issue