diff --git a/buildiso b/buildiso index d7cdcc4..eafd8f1 100755 --- a/buildiso +++ b/buildiso @@ -97,19 +97,18 @@ make_rootfs() { args+=(-P) fi - # Ignore init-logind providers alphabetically before the selected - # init to prevent pacman --noconfirm from pulling in the wrong one - # (elogind-dinit < elogind-openrc) and its conflicting deps. - # --ask 4 auto-answers YES to the "remove ?" question - # as a safety net if --ignore doesn't prevent the conflict entirely. - local ignore_args=() + # Pre-tend init-logind is already provided so pacman's resolver + # skips provider selection entirely. Without this, --noconfirm + # picks elogind-dinit (alphabetically before elogind-openrc), + # pulling in dinit -> dinit-rc which conflicts with openrc. + # --ask 4 auto-answers YES to any residual conflict questions. + local pacman_extra_args=() case "${INITSYS}" in - openrc) ignore_args=("--ignore=elogind-dinit" "--ask=4") ;; - runit) ignore_args=("--ignore=elogind-dinit" "--ignore=elogind-openrc" "--ask=4") ;; - s6) ignore_args=("--ignore=elogind-dinit" "--ignore=elogind-openrc" "--ignore=elogind-runit" "--ask=4") ;; + openrc|runit|s6) pacman_extra_args=("--assume-installed=init-logind") ;; esac + pacman_extra_args+=("--ask=4") - basestrap "${basestrap_args[@]}" "${args[@]}" "${rootfs}" "${packages[@]}" --overwrite='*' "${ignore_args[@]}" + basestrap "${basestrap_args[@]}" "${args[@]}" "${rootfs}" "${packages[@]}" --overwrite='*' "${pacman_extra_args[@]}" copy_overlay "${root_overlay}" "${rootfs}" diff --git a/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/basestrap/main.py b/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/basestrap/main.py index ee90036..368d7cb 100644 --- a/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/basestrap/main.py +++ b/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/basestrap/main.py @@ -343,22 +343,16 @@ class PMPacman(PackageManager): # Don't report download progress for each file command.append("--noprogressbar") - # Ignore init-logind providers that come alphabetically before - # the selected one, preventing pacman --noconfirm from picking - # the wrong one and pulling in a conflicting init system. - if libcalamares.globalstorage.contains("baseInit"): - base_init = libcalamares.globalstorage.value("baseInit") + # Pre-tend init-logind is already provided so pacman's resolver + # skips provider selection entirely, preventing it from selecting + # elogind-dinit (alphabetically before elogind-openrc) which would + # pull in dinit -> dinit-rc and conflict with OpenRC. + if libcalamares.globalstorage.contains("initProvider"): provider = libcalamares.globalstorage.value("initProvider") - 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]: - ignore_pkg = f"{base_init}-{p}" - command.append(f"--ignore={ignore_pkg}") + if provider and provider != "dinit": + command.append("--assume-installed=init-logind") - # Safety net: auto-answer YES to conflict resolution (e.g. - # "remove dinit-rc?") if --ignore doesn't prevent the conflict. + # Safety net: auto-answer YES to conflict resolution command.append("--ask=4") if self.pacman_needed_only: diff --git a/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/packages/main.py b/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/packages/main.py index 9ef5e83..c354c8d 100644 --- a/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/packages/main.py +++ b/iso-profiles/antergos/live-overlay/usr/lib/calamares/modules/packages/main.py @@ -221,17 +221,14 @@ class PMPacman(PackageManager): command.append("--noprogressbar") command.append("--overwrite=*") - # Same --ignore logic as basestrap module to prevent pacman - # --noconfirm from picking the wrong init-logind provider. + # Pre-tend init-logind is already provided so pacman's resolver + # skips provider selection entirely, preventing it from selecting + # elogind-dinit (alphabetically before elogind-openrc) which would + # pull in dinit -> dinit-rc and conflict with OpenRC. 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 provider and provider != "dinit": + command.append("--assume-installed=init-logind") # Safety net: auto-answer YES to conflict resolution command.append("--ask=4")