Repository navigation
Conversation
The conflict handler recognises conflicting files and conflicting packages. A dependency it cannot satisfy falls through both and reaches the bare exit 1 at the end, so omarchy-update prints only "Something went wrong during the update!" and the user is left to work out what happened from a transcript that has already scrolled. A held package is the usual cause: IgnorePkg keeps hyprland at the version built against libaquamarine.so=13 while aquamarine moves to 14, and pacman then refuses the whole transaction rather than the one package, so every later update stops in the same place. Nothing about that is healable or worth retrying, so it goes back to whoever started the update the same way a package conflict does. Pacman puts only the verdict on stderr and the lines naming what broke on stdout, which the upgrade deliberately leaves uncaptured to keep its progress on the terminal, so the resolver is asked again for them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALLhsWEVznJX5Js4CM59ZV
Automated AI review
Outcome: The new branch blames an IgnorePkg advice printed with no holdpacman gives the same verdict, often with the same Suggested change: print hold advice only when Reproducer (fails at 19454b8)Reproducer: the IgnorePkg advice is printed when nothing is heldReviewed head: 1. Test case in the PR's own test fileAppend this case to # pacman gives the same verdict, and the same "installing X breaks dependency"
# line, when nothing is held: a repository that has not rebuilt hyprland yet
# (issue #11086), or a foreign package built against the old library. With no
# IgnorePkg configured, the report must not tell the user to drop a hold.
cat >"$stub_bin/pacman-conf" <<'STUB'
#!/bin/bash
[[ $1 == IgnorePkg || $1 == IgnoreGroup ]] && exit 0
exit 1
STUB
chmod +x "$stub_bin/pacman-conf"
fresh_work
echo 0 >"$test_tmp/attempts"
echo "error: failed to prepare transaction (could not satisfy dependencies)" >"$test_tmp/report"
detail=":: installing aquamarine (0.15.0-2) breaks dependency 'libaquamarine.so=13-64' required by hyprland"
RESOLVE_DETAIL="$detail" run_update >"$test_tmp/out" 2>"$test_tmp/err" || true
if grep -q "held by IgnorePkg" "$test_tmp/err"; then
cat "$test_tmp/err" >&2
fail "an unsatisfiable dependency is blamed on an IgnorePkg hold that does not exist"
fi
pass "an unsatisfiable dependency with nothing held is not blamed on a hold"Actual output at the reviewed head (last lines, colour codes stripped): 2. Real pacman, no hold configuredThis script uses the real #!/bin/bash
# Reproducer for PR #11692: the dependency branch blames an IgnorePkg hold even
# when pacman.conf has no IgnorePkg at all.
#
# Usage: repro_no_hold.sh <omarchy checkout at the PR head>
# Needs only bash, python3 and pacman. Runs as an ordinary user against a
# throwaway pacman root (no root, no network, host databases untouched).
set -euo pipefail
omarchy=$1
lab=$(mktemp -d)
trap 'rm -rf "$lab"' EXIT
db=$lab/root/var/lib/pacman
mkdir -p "$db/local" "$db/sync" "$lab/bin" "$lab/root/cache" "$lab/root/gnupg" "$lab/root/hooks"
echo 9 >"$db/local/ALPM_DB_VERSION"
# Installed: hyprland built against libaquamarine.so=13, and a foreign (AUR)
# tool built against it too. No IgnorePkg anywhere.
local_pkg() { # name version depends/provides lines...
mkdir -p "$db/local/$1-$2"
printf '%%NAME%%\n%s\n\n%%VERSION%%\n%s\n\n%%ARCH%%\nany\n\n%s\n' "$1" "$2" "$3" >"$db/local/$1-$2/desc"
printf '%%FILES%%\n\n' >"$db/local/$1-$2/files"
}
local_pkg hyprland 0.50.0-1 $'%DEPENDS%\nlibaquamarine.so=13-64'
local_pkg some-aur-tool 1.0-1 $'%DEPENDS%\nlibaquamarine.so=13-64'
local_pkg aquamarine 0.14.0-1 $'%PROVIDES%\nlibaquamarine.so=13-64'
# The repository has the new aquamarine but has not rebuilt hyprland yet
# (the shape of issue #11086, a fresh install with no hold).
python3 - "$db/sync/core.db" <<'PY'
import io, sys, tarfile
pkgs = {
'hyprland-0.50.0-1': 'hyprland\n\n%VERSION%\n0.50.0-1\n\n%DEPENDS%\nlibaquamarine.so=13-64\n',
'aquamarine-0.15.0-2': 'aquamarine\n\n%VERSION%\n0.15.0-2\n\n%PROVIDES%\nlibaquamarine.so=14-64\n',
}
with tarfile.open(sys.argv[1], 'w:gz') as tf:
for d, body in pkgs.items():
data = (f'%FILENAME%\n{d}-any.pkg.tar.zst\n\n%NAME%\n' + body +
'\n%ARCH%\nany\n\n%CSIZE%\n1\n\n%ISIZE%\n1\n').encode()
ti = tarfile.TarInfo(d); ti.type = tarfile.DIRTYPE; ti.mode = 0o755; tf.addfile(ti)
ti = tarfile.TarInfo(d + '/desc'); ti.size = len(data); tf.addfile(ti, io.BytesIO(data))
PY
cat >"$lab/pacman.conf" <<EOF
[options]
RootDir = $lab/root
DBPath = $db/
CacheDir = $lab/root/cache/
LogFile = $lab/root/pacman.log
GPGDir = $lab/root/gnupg/
HookDir = $lab/root/hooks/
Architecture = auto
SigLevel = Never
[core]
Server = file://$lab/nowhere
EOF
printf '#!/bin/bash\nexec /usr/bin/pacman --config %q "$@"\n' "$lab/pacman.conf" >"$lab/bin/pacman"
chmod +x "$lab/bin/pacman"
echo "== IgnorePkg lines in the test pacman.conf:"
grep -c IgnorePkg "$lab/pacman.conf" || true
# The verdict pacman puts on stderr is what omarchy-update-system-pkgs saves.
report=$lab/report
PATH="$lab/bin:$PATH" LC_ALL=C pacman -Sup --print-format '%n' 2>"$report" >/dev/null || true
echo "== pacman stderr (the report the handler receives):"
cat "$report"
echo "== handler output at the PR head:"
set +e
PATH="$lab/bin:$omarchy/bin:$PATH" OMARCHY_UPDATE_CONFLICT=1 \
bash "$omarchy/bin/omarchy-update-system-pkgs-when-conflicted" "$report" 2>&1 |
sed 's/\x1b\[[0-9;]*m//g'
echo "== handler exit: ${PIPESTATUS[0]}"Actual output at the reviewed head: DetailsVerified:
Optional test improvement: the second new case passes against the base handler when run on its own, and removing both Related open PRs: #13538, #13601 and #9285 each change the same spot in this handler and conflict textually with this PR (#9285 also in the test file). If #13538 lands first, this branch has to stay above its Review informationTest scope: Source and sandbox tests 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. |
omarchy-update-system-pkgs-when-conflictedrecognises conflicting files and conflicting packages. A dependency it cannot satisfy falls through both and reaches the bareexit 1at the end, soomarchy-updateprints only:and the user is left to reconstruct what happened from a transcript that has already scrolled.
A held package is the usual cause. On the machine I hit this on,
IgnorePkgkeepshyprlandat the version built againstlibaquamarine.so=13whileaquamarinemoves to0.15.0and provides14:pacman refuses the whole transaction rather than the one package, so every later
omarchy updatestops in the same place with the same unhelpful message.Nothing about this is healable or worth retrying, so it goes back to whoever started the update, the same way a package conflict already does.
One wrinkle worth flagging: pacman puts only the verdict on stderr, and the lines naming what broke on stdout — which
omarchy-update-system-pkgsdeliberately leaves uncaptured so upgrade progress stays on the terminal. Verified:So the branch asks the resolver again (
-p, and no-ysince the databases the upgrade synced are still fresh) purely to recover those lines for the report.Two cases added to
test/shell.d/update-file-conflict-test.sh, covering the message and the fact that the branch neither retries the transaction nor moves any file aside. Both fail without the change; the whole suite andtest/clipass with it.🤖 Generated with Claude Code
https://claude.ai/code/session_01ALLhsWEVznJX5Js4CM59ZV