forked from Mirror/pmbootstrap
pmb.chroot.apk: Use unpacking operator to create command in install_run_apk() (MR 2525)
The unpacking operator can unpack any iterable of any type, unlike the + operator which only works on some sequences and requires them to be of the same type usually. Using it allows us to get rid of the line that disables the "operator" error code for this function.
This commit is contained in:
parent
c3b7a5f39e
commit
077efe3623
1 changed files with 2 additions and 4 deletions
|
@ -125,8 +125,6 @@ def packages_get_locally_built_apks(package_list: list[str], arch: Arch) -> list
|
|||
return local
|
||||
|
||||
|
||||
# FIXME: list[Sequence[PathString]] weirdness
|
||||
# mypy: disable-error-code="operator"
|
||||
def install_run_apk(
|
||||
to_add: list[str], to_add_local: list[Path], to_del: list[str], chroot: Chroot
|
||||
) -> None:
|
||||
|
@ -173,12 +171,12 @@ def install_run_apk(
|
|||
pmb.chroot.init(chroot)
|
||||
|
||||
# FIXME: use /mnt/pmb… until MR 2351 is reverted (pmb#2388)
|
||||
user_repo = []
|
||||
user_repo: list[PathString] = []
|
||||
for channel in pmb.config.pmaports.all_channels():
|
||||
user_repo += ["--repository", context.config.work / "packages" / channel]
|
||||
|
||||
for i, command in enumerate(commands):
|
||||
command = user_repo + command
|
||||
command = [*user_repo, *command]
|
||||
|
||||
# Ignore missing repos before initial build (bpo#137)
|
||||
if os.getenv("PMB_APK_FORCE_MISSING_REPOSITORIES") == "1":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue