Pass the target architecture to apt, otherwise mkosi ... --architecture
pulls in packages for the host architecture. This fixes generation of
container images for non-host architectures, e.g. generation of images
on amd64 host for arm64 target.
**kwargs: Any,
) -> CompletedProcess:
+ debarch = DEBIAN_ARCHITECTURES[config.architecture]
+
cmdline = [
f"/usr/bin/apt-{subcommand}",
"-o", f"Dir={root}",
"-o", f"DPkg::Chroot-Directory={root}",
+ "-o", f"APT::Architecture={debarch}",
operation,
*extra,
]