forked from Mirror/pmbootstrap
parse: deviceinfo: make Deviceinfo a class (MR 2252)
Introduce a Deviceinfo class and use it rather than the dictionary. This gives us sweet sweet autocomplete, and lays the foundation for having a proper deviceinfo validator in the future. Additionally, continue refactoring out args... Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
b51d31acab
commit
97bd8b96ec
27 changed files with 372 additions and 288 deletions
|
@ -9,19 +9,18 @@ import pmb.build
|
|||
import pmb.chroot.apk
|
||||
import pmb.config
|
||||
import pmb.config.pmaports
|
||||
from pmb.types import PmbArgs
|
||||
import pmb.flasher
|
||||
import pmb.helpers.file
|
||||
from pmb.core import Chroot, ChrootType
|
||||
|
||||
|
||||
def symlinks(args: PmbArgs, flavor, folder: Path):
|
||||
def symlinks(flavor, folder: Path):
|
||||
"""
|
||||
Create convenience symlinks to the rootfs and boot files.
|
||||
"""
|
||||
|
||||
context = get_context()
|
||||
arch = pmb.parse.deviceinfo(context.device)["arch"]
|
||||
arch = pmb.parse.deviceinfo(context.device).arch
|
||||
|
||||
# Backwards compatibility with old mkinitfs (pma#660)
|
||||
suffix = f"-{flavor}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue