From 81f215166db3f65acfa04dfd4e0924d245813971 Mon Sep 17 00:00:00 2001 From: Celestia Ludenberg Date: Sun, 5 Jul 2026 21:11:00 +0200 Subject: [PATCH] fix: install init-logind provider before base to avoid dinit-rc/openrc conflict dinit-rc and openrc both provide AND conflict with virtual init-rc and cannot coexist. When base depends on init-logind (virtual), pacman with --noconfirm picks the first alphabetically -- elogind-dinit over elogind-openrc -- pulling in dinit -> dinit-rc, which conflicts with openrc (pulled by elogind-openrc via dbus-openrc). Fix: use operations.insert(0, ...) so elogind-{init} installs as a separate pacman call BEFORE base, satisfying init-logind before base needs it. --- AGENTS.md | 5 +++++ .../usr/lib/calamares/modules/basestrap/main.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index df63bff..a731d57 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,6 +62,11 @@ CI does this automatically. Forget this step and buildiso will try to fetch our ### WORKSPACE_DIR `buildiso` looks for profiles at `$WORKSPACE_DIR/iso-profiles//` if `WORKSPACE_DIR` is set. Always set it to the repo root when building locally. +### dinit-rc / openrc init-rc conflict during basestrap +`dinit-rc` and `openrc` both provide AND conflict with virtual `init-rc`. They cannot coexist. When `base` depends on `init-logind` (virtual), pacman with `--noconfirm` picks the first alphabetically — `elogind-dinit` (before `elogind-openrc`). `elogind-dinit` → `dbus-dinit` → `dinit` → `dinit-rc`, which conflicts with `openrc` (pulled by `elogind-openrc` via `dbus-openrc`). + +**Fix in `basestrap/main.py`**: Install `elogind-{init}` as a **separate pacman call BEFORE `base`**, using `operations.insert(0, ...)` instead of appending to the same operation. This way `init-logind` is already satisfied when `base` installs, and pacman won't try to resolve it alphabetically. + ## Repo Structure ``` 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 3459e25..e10dfd8 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 @@ -542,7 +542,11 @@ def run(): if provider in known_inits: init_pkg = "-".join([base_init, provider]) libcalamares.utils.debug("Init provider package added: {!s}".format(init_pkg)) - operations[0]["install"].append(init_pkg) + # Install init-logind provider BEFORE base so pacman doesn't + # pick the wrong one alphabetically (elogind-dinit comes before + # elogind-openrc), which would pull in dinit+dinit-rc and + # conflict with openrc via the init-rc virtual. + operations.insert(0, {"install": [init_pkg]}) libcalamares.globalstorage.insert("initProvider", provider) break