forked from Mirror/pmbootstrap
init: ask whether to install systemd (MR 2273)
Add the following question to "pmbootstrap init": [22:12:57] Based on your UI selection, 'default' will result in installing systemd. [22:12:57] Install systemd? (default/always/never) [default]: Determine whether the UI prefers to have systemd or not, based on "pmb:systemd" in the UI package's APKBUILD. Determine whether the currently selected branch supports systemd, by checking for a "[repo:systemd]" section in pmaports.cfg. This section will also contain bootstrap information, to be used in future patches.
This commit is contained in:
parent
c6e8a89ea3
commit
e96ca36376
5 changed files with 59 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import os
|
||||
import glob
|
||||
import pmb.helpers.pmaports
|
||||
import pmb.parse
|
||||
|
||||
|
||||
|
@ -21,3 +22,12 @@ def list(args, arch):
|
|||
if pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch):
|
||||
ret.append((ui, apkbuild["pkgdesc"]))
|
||||
return ret
|
||||
|
||||
|
||||
def check_option(args, ui, option):
|
||||
"""
|
||||
Check if an option, such as pmb:systemd, is inside an UI's APKBUILD.
|
||||
"""
|
||||
pkgname = f"postmarketos-ui-{ui}"
|
||||
apkbuild = pmb.helpers.pmaports.get(args, pkgname, subpackages=False)
|
||||
return option in apkbuild["options"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue