pmb.flasher: Remove use of args (MR 2441)

Also adapt pmb/install/recovery.py to new API for variables.py.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Newbyte 2024-10-21 00:04:54 +02:00
parent 2305cc5db6
commit 37ec73c07c
No known key found for this signature in database
GPG key ID: 8A700086A9FE41FD
9 changed files with 140 additions and 56 deletions

View file

@ -21,7 +21,14 @@ def create_zip(args: PmbArgs, chroot: Chroot, device: str):
flavor = pmb.helpers.frontend._parse_flavor(device)
deviceinfo = pmb.parse.deviceinfo()
method = deviceinfo.flash_method
fvars = pmb.flasher.variables(args, flavor, method)
fvars = pmb.flasher.variables(
flavor,
method,
getattr(args, "cmdline", None),
getattr(args, "no_reboot", None),
getattr(args, "partition", None),
getattr(args, "resume", None),
)
# Install recovery installer package in buildroot
pmb.chroot.apk.install(["postmarketos-android-recovery-installer"], chroot)