Install the separately owned firmware aliases through the package helper so stock firmware updates and stable refreshes retain them. Use a distinct migration to reach machines with the prior migration completed and preserve the reboot prompt until reboot. Restore the generic updater and leave display quirks to the kernel. Co-Authored-By: Codex GPT-6.1-Sol XHigh <noreply@openai.com>
26 lines
984 B
Bash
Executable File
26 lines
984 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Run a pacman transaction for the Omarchy update flow, shielded from desktop session teardown.
|
|
# omarchy:args=<pacman-args>
|
|
# omarchy:hidden=true
|
|
# omarchy:requires-sudo=true
|
|
|
|
# Upgrading systemd runs its post_upgrade scriptlet mid-transaction, which
|
|
# reexecs both the system manager and every user manager. A pacman running
|
|
# inside a user-session scope can be SIGKILLed by that reexec, abandoning the
|
|
# transaction halfway. Registering the transaction as a PID 1 scope keeps it
|
|
# out of the user manager's cgroups entirely, and system scopes survive the
|
|
# system manager's own reexec.
|
|
scope=()
|
|
if [[ -d /run/systemd/system && ! -L /run/systemd/system ]]; then
|
|
scope=(systemd-run --scope --quiet --collect)
|
|
fi
|
|
|
|
# LC_ALL passes through so callers that parse pacman's stderr can pin the locale.
|
|
env_args=(OMARCHY_UPDATE_PACMAN=1)
|
|
if [[ -n ${LC_ALL:-} ]]; then
|
|
env_args+=(LC_ALL="$LC_ALL")
|
|
fi
|
|
|
|
exec sudo env "${env_args[@]}" "${scope[@]}" pacman "$@"
|