Repository navigation
Say which files block an upgrade the conflict recovery won't clear - #13538
stevederico wants to merge 2 commits into
Conversation
When pacman reports conflicting files the recovery does not clear -- owned by another package, or blamed on a package that isn't Omarchy's -- it exited 1 without a word. The update ended on the generic failure, and every later update failed the same way with no hint of the cause (omacom#13290: owe files left behind by an interrupted install). List the conflicting files, say why they were left alone, and what to do. What the recovery is willing to move is unchanged. Refs omacom#13290
Automated AI review
Outcome: The new explanation gives a reason that does not fit every file it lists. Reason does not fit every listed fileA mixed report (an Suggested change: List only paths not in Reproducer (A fails at fdd8851; B shows the omarchy-nvim output)Reproducer: the reason printed does not fit every file listedReviewed head: fdd8851 A. Mixed report: the Omarchy leftover the recovery would move is listed for the personAppend to # Mixed report: the Omarchy leftover would be cleared by the recovery once the
# other conflict is gone, so only the other package's file needs a person.
fresh_work
echo "ours" >"$stray"
write_raw_report \
"omarchy-settings-dev: $stray exists in filesystem" \
"some-package: $work/theirs exists in filesystem (owned by other-package)"
if run_update >"$test_tmp/out" 2>"$test_tmp/err"; then
fail "an upgrade with an unhealable conflict reports success"
fi
grep -qxF " some-package: $work/theirs exists in filesystem (owned by other-package)" "$test_tmp/err" ||
fail "the conflict that needs a person is not named" "$(<"$test_tmp/err")"
! grep -qxF " omarchy-settings-dev: $stray exists in filesystem" "$test_tmp/err" ||
fail "a file the recovery would clear itself is listed as needing a person" "$(<"$test_tmp/err")"
pass "a mixed report names only the conflicts the recovery would not clear"Actual output at fdd8851 (exit 1; the 19 existing checks pass first): The first listed file is exactly what the printed rule says Omarchy moves. It was left only because of the all-or-nothing rule (lines 111-113), which the message does not mention. B. An Omarchy package outside the recovery's listAppend instead: # An unowned file blamed on an Omarchy package outside the recovery's list
# (omarchy-nvim is in install/omarchy-base.packages). Prints what the person sees.
fresh_work
echo "stray" >"$stray"
write_report omarchy-nvim "$stray"
if run_update >"$test_tmp/out" 2>"$test_tmp/err"; then
fail "a conflict the recovery does not take reports success"
fi
sed 's/^/# /' "$test_tmp/err"
pass "printed what an omarchy-nvim conflict shows"Actual output at fdd8851 (exit 0): The recovery only takes ( Optional test improvement: the file-name check passes without the listOptional test improvement: the caller already prints pacman's report, so the grep at test line 150 matches pacman's own line and still passes with line 91 (the list) deleted. This is test-only; production behaviour is unaffected. Matching the handler's indented line with Reproducer (passes at fdd8851 with the list deleted): Reproducer: the new "names the file in the way" check passes without the file listReviewed head: fdd8851 StepsFrom a checkout of the PR head, delete the one line in sed -i '91d' bin/omarchy-update-system-pkgs-when-conflicted
bash test/shell.d/update-file-conflict-test.shActual outputAll 19 checks pass (exit 0), including: Why
( Suggested checkThe handler indents the lines it lists and the caller's copy is not indented, so matching the whole indented line pins the new list: grep -qxF " some-other-pkg: $stray exists in filesystem" "$test_tmp/err" ||
fail "a conflict left for a human names the file in the way" "$(<"$test_tmp/err")"With line 91 deleted this fails: At fdd8851 unchanged it passes (all 19 checks, exit 0). DetailsVerified (sandboxed shell tests with stubbed pacman and sudo):
Related open PRs (textual conflicts in the handler):
Optional notes:
Review informationTest scope: Source and sandboxed shell tests with stubbed pacman, at AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
When one conflict needed a hand and another was a leftover the recovery could take, the explanation listed both, so people were asked to move a file the recovery takes once the rest are gone. It also said "one of Omarchy's own packages" while only four are handled. List only the files left for the person, name the four packages, say nothing moves until every file qualifies, and say how many the recovery will take itself.
When pacman reports file conflicts the update can't clear by itself,
omarchy updateends on "Something went wrong" with no clue, and every later update fails the same way. This says which files are in the way and what to do. Refs #13290Before:
omarchy-update-system-pkgs-when-conflictedexits 1 without a word when a conflicting file is owned by another package or blamed on a non-Omarchy package.After: it lists those files, says it only moves files no package owns that
omarchy,omarchy-dev,omarchy-settingsoromarchy-settings-devinstalls, and that it moves nothing until all qualify. Files it would move itself are left off the list and counted. Non-conflict failures (a failed download) print nothing extra.How I tested
bash test/shell.d/update-file-conflict-test.shpasses (20 ok) and fails with the fix reverted.update-package-conflict-test.shpasses/usr/bin/bash(owned by bash): it printed the list and the advice and exited 1, moving nothing