fix(mango): do not auto-sync GURU before git; verify the shell started
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
- Write guru.conf with auto-sync = no so the first emerge --sync (before dev-vcs/git exists) only syncs the main tree; GURU is synced explicitly. - In the Mango session, check dms.service is active after starting mango-session.target and fall back to a direct 'dms run' if not.
This commit is contained in:
parent
25f7381b4a
commit
6eb4036c22
1 changed files with 14 additions and 6 deletions
|
|
@ -251,7 +251,10 @@ pub fn guru_repos_conf() -> String {
|
||||||
o.push_str("location = /var/db/repos/guru\n");
|
o.push_str("location = /var/db/repos/guru\n");
|
||||||
o.push_str("sync-type = git\n");
|
o.push_str("sync-type = git\n");
|
||||||
o.push_str(&format!("sync-uri = {GURU_REPO_URI}\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
|
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
|
QT_QPA_PLATFORM >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Exactly one shell: DMS, bound to mango-session.target. Fall back to a direct
|
# Exactly one shell: DMS, bound to mango-session.target. Verify it actually
|
||||||
# `dms run` only when the user manager is unavailable.
|
# 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 \
|
if command -v systemctl >/dev/null 2>&1 \
|
||||||
&& systemctl --user start mango-session.target >/dev/null 2>&1; then
|
&& systemctl --user start mango-session.target >/dev/null 2>&1; then
|
||||||
:
|
sleep 0.5
|
||||||
elif command -v dms >/dev/null 2>&1; then
|
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
|
start_helper dms run
|
||||||
else
|
elif [ "$started" = 0 ]; then
|
||||||
echo "phoebus-session-mango: dms not found; the shell will not start" >&2
|
echo "phoebus-session-mango: dms not found; the shell will not start" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue