fix: add --ask=4 safety net for init-rc conflicts in all three pacman code paths
--ignore alone doesn't reliably prevent provider resolution during fresh pacman -S installs. --ask=4 auto-answers YES to conflict resolution questions (e.g. 'remove dinit-rc?') with --noconfirm, providing a safety net when --ignore doesn't prevent the dinit-rc vs openrc conflict. All three code paths updated: - buildiso: make_rootfs() basestrap call - basestrap/main.py: PMPacman.install() - packages/main.py: PMPacman.install()
This commit is contained in:
@@ -100,11 +100,13 @@ make_rootfs() {
|
||||
# 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 <conflicting>?" question
|
||||
# as a safety net if --ignore doesn't prevent the conflict entirely.
|
||||
local ignore_args=()
|
||||
case "${INITSYS}" in
|
||||
openrc) ignore_args=("--ignore=elogind-dinit") ;;
|
||||
runit) ignore_args=("--ignore=elogind-dinit" "--ignore=elogind-openrc") ;;
|
||||
s6) ignore_args=("--ignore=elogind-dinit" "--ignore=elogind-openrc" "--ignore=elogind-runit") ;;
|
||||
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") ;;
|
||||
esac
|
||||
|
||||
basestrap "${basestrap_args[@]}" "${args[@]}" "${rootfs}" "${packages[@]}" --overwrite='*' "${ignore_args[@]}"
|
||||
|
||||
@@ -357,6 +357,10 @@ class PMPacman(PackageManager):
|
||||
ignore_pkg = f"{base_init}-{p}"
|
||||
command.append(f"--ignore={ignore_pkg}")
|
||||
|
||||
# Safety net: auto-answer YES to conflict resolution (e.g.
|
||||
# "remove dinit-rc?") if --ignore doesn't prevent the conflict.
|
||||
command.append("--ask=4")
|
||||
|
||||
if self.pacman_needed_only:
|
||||
command.append("--needed")
|
||||
|
||||
|
||||
@@ -233,6 +233,9 @@ class PMPacman(PackageManager):
|
||||
for p in sorted_inits[:idx]:
|
||||
command.append(f"--ignore={base_init}-{p}")
|
||||
|
||||
# Safety net: auto-answer YES to conflict resolution
|
||||
command.append("--ask=4")
|
||||
|
||||
if self.pacman_needed_only is True:
|
||||
command.append("--needed")
|
||||
if self.pacman_disable_timeout is True:
|
||||
|
||||
Reference in New Issue
Block a user