From: Daan De Meyer Date: Sun, 10 Dec 2023 10:31:23 +0000 (+0100) Subject: arch: Unconditionally assume initramfs package is installed X-Git-Tag: v20~88^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2151%2Fhead;p=thirdparty%2Fmkosi.git arch: Unconditionally assume initramfs package is installed This doesn't prevent installing individual initramfs generators so let's always set it and require users to specify mkinitcpio or dracut if they really need one of these. --- diff --git a/mkosi/distributions/arch.py b/mkosi/distributions/arch.py index 3c54a9e91..80af9716f 100644 --- a/mkosi/distributions/arch.py +++ b/mkosi/distributions/arch.py @@ -3,7 +3,6 @@ from collections.abc import Sequence from mkosi.architecture import Architecture -from mkosi.config import ConfigFeature from mkosi.distributions import Distribution, DistributionInstaller, PackageType from mkosi.installer.pacman import PacmanRepository, invoke_pacman, setup_pacman from mkosi.log import die @@ -108,14 +107,13 @@ class Installer(DistributionInstaller): @classmethod def install_packages(cls, state: MkosiState, packages: Sequence[str], apivfs: bool = True) -> None: - options = ["--refresh", "--needed"] - - # If we're generating a bootable image, we'll do so with a prebuilt initramfs, so no need for an - # initramfs generator. - if state.config.bootable != ConfigFeature.disabled: - options += ["--assume-installed", "initramfs"] - - invoke_pacman(state, "--sync", options, packages, apivfs=apivfs) + invoke_pacman( + state, + "--sync", + ["--refresh", "--needed", "--assume-installed", "initramfs"], + packages, + apivfs=apivfs, + ) @classmethod def remove_packages(cls, state: MkosiState, packages: Sequence[str]) -> None: