fix: add --ignore logic to packages module too

The branding's netinstall.yaml has a Base System group with 'base'
that gets added to packageOperations. The packages module then
reinstalls base without --ignore, triggering the same init-logind
resolution bug. Adding the same --ignore logic from the basestrap
module.
This commit is contained in:
2026-07-05 22:03:03 +02:00
parent 8a6fa3fa5d
commit 2c0d2424b4
@@ -221,6 +221,18 @@ class PMPacman(PackageManager):
command.append("--noprogressbar") command.append("--noprogressbar")
command.append("--overwrite=*") command.append("--overwrite=*")
# Same --ignore logic as basestrap module to prevent pacman
# --noconfirm from picking the wrong init-logind provider.
if libcalamares.globalstorage.contains("initProvider"):
provider = libcalamares.globalstorage.value("initProvider")
base_init = libcalamares.globalstorage.value("baseInit")
if base_init and provider:
sorted_inits = ["dinit", "openrc", "runit", "s6"]
if provider in sorted_inits:
idx = sorted_inits.index(provider)
for p in sorted_inits[:idx]:
command.append(f"--ignore={base_init}-{p}")
if self.pacman_needed_only is True: if self.pacman_needed_only is True:
command.append("--needed") command.append("--needed")
if self.pacman_disable_timeout is True: if self.pacman_disable_timeout is True: