pmb.types.CrossCompileType: split up None

Replace None with the three things it is actually used for to make the
code easier to follow:
* "autodetect"
* "unnecessary"
* "qemu-only"

I've used the term "unnecessary" instead of "native", because "native"
was previously used for "cross-native", then "cross-native2" and it
still sounds similar to these.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2568
This commit is contained in:
Oliver Smith 2025-03-14 18:28:45 +01:00
parent 0625ece550
commit bef3b43343
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 17 additions and 12 deletions

View file

@ -8,7 +8,14 @@ from typing import Any, Literal, TypedDict
from pmb.core.arch import Arch
CrossCompileType = Literal["crossdirect", "cross-native", "cross-native2"] | None
CrossCompileType = Literal[
"autodetect",
"unnecessary",
"qemu-only",
"crossdirect",
"cross-native",
"cross-native2",
]
RunOutputTypeDefault = Literal["log", "stdout", "interactive", "tui", "null"]
RunOutputTypePopen = Literal["background", "pipe"]
RunOutputType = RunOutputTypeDefault | RunOutputTypePopen