diff --git a/installer-rs/crates/phoebus-core/src/system.rs b/installer-rs/crates/phoebus-core/src/system.rs index 6012167..50672cf 100644 --- a/installer-rs/crates/phoebus-core/src/system.rs +++ b/installer-rs/crates/phoebus-core/src/system.rs @@ -251,7 +251,10 @@ pub fn guru_repos_conf() -> String { o.push_str("location = /var/db/repos/guru\n"); o.push_str("sync-type = git\n"); o.push_str(&format!("sync-uri = {GURU_REPO_URI}\n")); - o.push_str("auto-sync = yes\n"); + // GURU is git-only and git is not installed yet during the first + // `emerge --sync`; syncing it explicitly after installing git keeps the + // initial main-tree sync from failing. + o.push_str("auto-sync = no\n"); o } @@ -774,14 +777,19 @@ if command -v dbus-update-activation-environment >/dev/null 2>&1; then QT_QPA_PLATFORM >/dev/null 2>&1 || true fi -# Exactly one shell: DMS, bound to mango-session.target. Fall back to a direct -# `dms run` only when the user manager is unavailable. +# Exactly one shell: DMS, bound to mango-session.target. Verify it actually +# started and fall back to a direct `dms run` if the user manager did not. +started=0 if command -v systemctl >/dev/null 2>&1 \ && systemctl --user start mango-session.target >/dev/null 2>&1; then - : -elif command -v dms >/dev/null 2>&1; then + sleep 0.5 + if systemctl --user is-active --quiet dms.service 2>/dev/null; then + started=1 + fi +fi +if [ "$started" = 0 ] && command -v dms >/dev/null 2>&1; then start_helper dms run -else +elif [ "$started" = 0 ]; then echo "phoebus-session-mango: dms not found; the shell will not start" >&2 fi