Remove the omarchy-update-perform compatibility wrapper
Nothing calls it anymore; new code calls omarchy-update directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
76dc120ccb
commit
0f1e0ced36
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# omarchy:summary=Compatibility wrapper for omarchy-update -y.
|
|
||||||
# omarchy:hidden=true
|
|
||||||
# omarchy:requires-sudo=true
|
|
||||||
|
|
||||||
exec omarchy-update -y
|
|
||||||
@@ -247,7 +247,6 @@ scripts.
|
|||||||
| `omarchy-update-lock` | Hidden command wrapper that holds the per-user update lock while its child runs. | **Keep internal/hidden.** Isolates update concurrency and lock descriptor handling. |
|
| `omarchy-update-lock` | Hidden command wrapper that holds the per-user update lock while its child runs. | **Keep internal/hidden.** Isolates update concurrency and lock descriptor handling. |
|
||||||
| `omarchy-update-stay-awake` | Hidden helper that starts or stops update-owned sleep and idle inhibition, restoring only the state it changed. | **Keep internal/hidden.** Keeps inhibitor ownership and cleanup together. |
|
| `omarchy-update-stay-awake` | Hidden helper that starts or stops update-owned sleep and idle inhibition, restoring only the state it changed. | **Keep internal/hidden.** Keeps inhibitor ownership and cleanup together. |
|
||||||
| `omarchy-update-status` | Hidden helper that refreshes or clears the shell update indicator after rechecking available updates. | **Keep internal/hidden.** Keeps shell status synchronization out of the main pipeline. |
|
| `omarchy-update-status` | Hidden helper that refreshes or clears the shell update indicator after rechecking available updates. | **Keep internal/hidden.** Keeps shell status synchronization out of the main pipeline. |
|
||||||
| `omarchy-update-perform` | Hidden compatibility wrapper for `omarchy-update -y`. | **Temporary.** Keep only for old callers; new code should call `omarchy-update` directly. |
|
|
||||||
| `omarchy-update-confirm` | Gum confirmation copy for `omarchy update`. | **Question.** Could be inlined into `omarchy-update`; separate file only helps keep copy isolated. |
|
| `omarchy-update-confirm` | Gum confirmation copy for `omarchy update`. | **Question.** Could be inlined into `omarchy-update`; separate file only helps keep copy isolated. |
|
||||||
| `omarchy-update-dev` | Fast-forwards the active dev-linked checkout from its configured upstream; no-ops for package-backed installs. | **Keep.** Runs before package updates so a checkout conflict stops the update before system mutation. |
|
| `omarchy-update-dev` | Fast-forwards the active dev-linked checkout from its configured upstream; no-ops for package-backed installs. | **Keep.** Runs before package updates so a checkout conflict stops the update before system mutation. |
|
||||||
| `omarchy-update-keyring` | Ensures Omarchy keyring and Arch keyring are current before the main transaction. | **Keep, but review.** It uses targeted `pacman -Sy` for keyring bootstrapping; acceptable for this special case but should remain tightly scoped. |
|
| `omarchy-update-keyring` | Ensures Omarchy keyring and Arch keyring are current before the main transaction. | **Keep, but review.** It uses targeted `pacman -Sy` for keyring bootstrapping; acceptable for this special case but should remain tightly scoped. |
|
||||||
@@ -280,8 +279,6 @@ scripts.
|
|||||||
|
|
||||||
3. **Update pipeline ownership**
|
3. **Update pipeline ownership**
|
||||||
- `omarchy-update` owns the full update pipeline now.
|
- `omarchy-update` owns the full update pipeline now.
|
||||||
- `omarchy-update-perform` is only a hidden compatibility wrapper for
|
|
||||||
`omarchy-update -y`.
|
|
||||||
|
|
||||||
4. **Mise remains in the blessed update path**
|
4. **Mise remains in the blessed update path**
|
||||||
- `omarchy-update-mise` intentionally runs as part of `omarchy update`.
|
- `omarchy-update-mise` intentionally runs as part of `omarchy update`.
|
||||||
|
|||||||
@@ -75,32 +75,6 @@ grep -q "already running" "$test_tmp/update-second.out" || fail "second omarchy-
|
|||||||
[[ ! -f $test_tmp/update-second-snapshot-started ]] || fail "second omarchy-update did not snapshot while lock was held"
|
[[ ! -f $test_tmp/update-second-snapshot-started ]] || fail "second omarchy-update did not snapshot while lock was held"
|
||||||
pass "omarchy-update prevents overlapping top-level updates"
|
pass "omarchy-update prevents overlapping top-level updates"
|
||||||
|
|
||||||
# omarchy-update-perform is now only a compatibility wrapper around
|
|
||||||
# omarchy-update -y, but it should still respect the same update lock.
|
|
||||||
perform_marker="$test_tmp/perform-started"
|
|
||||||
write_stub omarchy-update-keyring 'echo started >"$TEST_MARKER"; sleep 2; exit 0'
|
|
||||||
|
|
||||||
TEST_MARKER="$perform_marker" run_with_lock_env "$ROOT/bin/omarchy-update-perform" >"$test_tmp/perform-first.out" 2>&1 &
|
|
||||||
perform_pid=$!
|
|
||||||
|
|
||||||
for _ in {1..50}; do
|
|
||||||
[[ -f $perform_marker ]] && break
|
|
||||||
sleep 0.05
|
|
||||||
done
|
|
||||||
[[ -f $perform_marker ]] || fail "first omarchy-update-perform delegated to update under lock"
|
|
||||||
|
|
||||||
set +e
|
|
||||||
TEST_MARKER="$test_tmp/perform-second-started" run_with_lock_env "$ROOT/bin/omarchy-update-perform" >"$test_tmp/perform-second.out" 2>&1
|
|
||||||
perform_second_status=$?
|
|
||||||
set -e
|
|
||||||
|
|
||||||
wait "$perform_pid"
|
|
||||||
|
|
||||||
[[ $perform_second_status -ne 0 ]] || fail "second omarchy-update-perform exits non-zero while update lock is held"
|
|
||||||
grep -q "already running" "$test_tmp/perform-second.out" || fail "second omarchy-update-perform reports held update lock"
|
|
||||||
[[ ! -f $test_tmp/perform-second-started ]] || fail "second omarchy-update-perform did not snapshot while lock was held"
|
|
||||||
pass "omarchy-update-perform compatibility wrapper respects update lock"
|
|
||||||
|
|
||||||
# The sleep inhibitor deliberately outlives the step that starts it, so it must
|
# The sleep inhibitor deliberately outlives the step that starts it, so it must
|
||||||
# not inherit the update lock. An update killed before restore_update_inhibitors
|
# not inherit the update lock. An update killed before restore_update_inhibitors
|
||||||
# would otherwise leave the inhibitor holding the flock forever, blocking every
|
# would otherwise leave the inhibitor holding the flock forever, blocking every
|
||||||
|
|||||||
Reference in New Issue
Block a user