Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bin/omarchy-update
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ if [[ ${1:-} == "-y" ]] || omarchy-update-confirm; then
# takes the update with it rather than migrating against what is still on disk.
omarchy-update-system-pkgs

# Migrations call into the shell over IPC, and the running one still has the
# code from before this update: its hot reload fires while the files are
# still being replaced and can settle on a mix of old and new. A function
# added since then answers "Function not found." and stops the whole queue.
if omarchy-migrate --pending >/dev/null; then
omarchy-restart-shell || true
fi
omarchy-migrate
omarchy-update-orphan-pkgs -y

Expand Down
1 change: 1 addition & 0 deletions docs/update-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ omarchy-update
│ install/config/snapper.sh, and the update continues without one)
├─ omarchy-update-stay-awake start
├─ run system-package updates
├─ restart the shell when migrations are pending, so they reach current code
├─ run migrations
├─ automatically remove orphan packages and run log analysis
├─ clear the shell update indicator: the update just installed what it showed
Expand Down
2 changes: 1 addition & 1 deletion test/shell.d/fixtures/sudo-boundary-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ case "$step" in
esac
STUB
chmod +x "$SUDO_TEST_ROOT/bin/test-step"
for step in omarchy-update-lock omarchy-update-requires-free-space omarchy-update-confirm omarchy-update-pkg-prune omarchy-snapshot omarchy-update-stay-awake omarchy-update-dev omarchy-update-boot omarchy-update-keyring omarchy-update-system-pkgs omarchy-migrate omarchy-hook omarchy-update-aur-pkgs omarchy-update-mise omarchy-update-orphan-pkgs omarchy-update-analyze-logs omarchy-shell omarchy-update-restart omarchy-pkg-aur-accessible omarchy-notification-dismiss pacman systemd-run cp yay; do
for step in omarchy-update-lock omarchy-update-requires-free-space omarchy-update-confirm omarchy-update-pkg-prune omarchy-snapshot omarchy-update-stay-awake omarchy-update-dev omarchy-update-boot omarchy-update-keyring omarchy-update-system-pkgs omarchy-migrate omarchy-hook omarchy-update-aur-pkgs omarchy-update-mise omarchy-update-orphan-pkgs omarchy-update-analyze-logs omarchy-shell omarchy-update-restart omarchy-pkg-aur-accessible omarchy-notification-dismiss omarchy-restart-shell pacman systemd-run cp yay; do
ln -s test-step "$SUDO_TEST_ROOT/bin/$step"
done
ln -s ../bin/test-step "$SUDO_TEST_ROOT/mock/pacman"
Expand Down
1 change: 1 addition & 0 deletions test/shell.d/update-disk-space-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ for command in \
omarchy-update-boot \
omarchy-hook \
omarchy-update-analyze-logs \
omarchy-restart-shell \
omarchy-shell \
omarchy-update-restart; do
write_stub "$command" 'exit 0'
Expand Down
1 change: 1 addition & 0 deletions test/shell.d/update-lock-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ for command in \
omarchy-update-boot \
omarchy-hook \
omarchy-update-analyze-logs \
omarchy-restart-shell \
omarchy-shell \
omarchy-update-restart; do
write_stub "$command" 'exit 0'
Expand Down
5 changes: 4 additions & 1 deletion test/shell.d/update-sequence-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ steps=(
omarchy-update-keyring
omarchy-update-system-pkgs
omarchy-migrate
omarchy-restart-shell
omarchy-hook
omarchy-update-aur-pkgs
omarchy-update-mise
Expand Down Expand Up @@ -78,6 +79,8 @@ expected_steps() {
omarchy-update-keyring \
omarchy-update-system-pkgs \
omarchy-migrate \
omarchy-restart-shell \
omarchy-migrate \
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
omarchy-update-orphan-pkgs \
omarchy-update-analyze-logs \
omarchy-shell \
Expand Down Expand Up @@ -117,7 +120,7 @@ pass "a confirmed update approves orphan removal"
if FAILING_STEP=omarchy-update-system-pkgs run_update -y; then
fail "an update whose packages did not upgrade passes for a whole one"
fi
for step in omarchy-migrate omarchy-hook omarchy-update-aur-pkgs omarchy-update-restart; do
for step in omarchy-migrate omarchy-restart-shell omarchy-hook omarchy-update-aur-pkgs omarchy-update-restart; do
if grep -q "^$step " "$test_tmp/steps"; then
fail "a blocked package upgrade still runs $step"
fi
Expand Down
Loading