install: explicitly install osk-sdl when needed (MR 2066)
This adds osk-sdl to the rootfs when --fde is set, or when building a rootfs for the ondev installer. Ideally the ondev installer would selectively install osk-sdl if the user opted for fde at runtime, but I haven't found a straight forward way to enable that yet, and this behavior here is no different than the current behavior (where osk-sdl is always installed in the rootfs by way of depends= in pmos-mkinitfs). For images that are built without --fde, osk-sdl won't be installed at all in the rootfs, once the dependency is dropped from pmos-mkinitfs. Instead, a dummy package postmarketos-base-nofde will be installed instead to satisfy the dependency that postmarketos-mkinitfs has on the virtual package "postmarketos-fde-unlocker"
This commit is contained in:
parent
6afd35eb11
commit
31e36e195c
|
@ -713,6 +713,13 @@ def install_on_device_installer(args, step, steps):
|
||||||
"postmarketos-ondev"] +
|
"postmarketos-ondev"] +
|
||||||
get_kernel_package(args, args.device) +
|
get_kernel_package(args, args.device) +
|
||||||
get_nonfree_packages(args, args.device))
|
get_nonfree_packages(args, args.device))
|
||||||
|
|
||||||
|
pmaports_cfg = pmb.config.pmaports.read_config(args)
|
||||||
|
# Use the fde unlocker dummy package instead of osk-sdl if pmaports
|
||||||
|
# supports it, since the ondev image isn't using fde itself
|
||||||
|
if pmaports_cfg.get("supported_base_nofde", None):
|
||||||
|
packages += ["postmarketos-base-nofde"]
|
||||||
|
|
||||||
suffix_installer = f"installer_{args.device}"
|
suffix_installer = f"installer_{args.device}"
|
||||||
pmb.chroot.apk.install(args, packages, suffix_installer)
|
pmb.chroot.apk.install(args, packages, suffix_installer)
|
||||||
|
|
||||||
|
@ -806,6 +813,19 @@ def create_device_rootfs(args, step, steps):
|
||||||
if locale_is_set:
|
if locale_is_set:
|
||||||
install_packages += ["lang", "musl-locales"]
|
install_packages += ["lang", "musl-locales"]
|
||||||
|
|
||||||
|
pmaports_cfg = pmb.config.pmaports.read_config(args)
|
||||||
|
# postmarketos-base supports a dummy package for blocking osk-sdl install
|
||||||
|
# when not required
|
||||||
|
if pmaports_cfg.get("supported_base_nofde", None):
|
||||||
|
# The ondev installer *could* enable fde at runtime, so include it
|
||||||
|
# explicitly in the rootfs until there's a mechanism to selectively
|
||||||
|
# install it when the ondev installer is running.
|
||||||
|
# Always install it when --fde is specified.
|
||||||
|
if args.full_disk_encryption or args.on_device_installer:
|
||||||
|
install_packages += ["osk-sdl"]
|
||||||
|
else:
|
||||||
|
install_packages += ["postmarketos-base-nofde"]
|
||||||
|
|
||||||
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
||||||
|
|
||||||
# Explicitly call build on the install packages, to re-build them or any
|
# Explicitly call build on the install packages, to re-build them or any
|
||||||
|
|
Loading…
Reference in New Issue