Skip to content

Ask about a package conflict instead of guessing at it - #6830

Merged
dhh merged 1 commit into
quattrofrom
update-conflict-escalation
Aug 14, 2026
Merged

Ask about a package conflict instead of guessing at it#6830
dhh merged 1 commit into
quattrofrom
update-conflict-escalation

Conversation

@dhh

@dhh dhh commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

pacman -Syu --noconfirm answers No to its own package-conflict removal question, so a single upstream package split stops every update after it. With the current QEMU transition, qemu-common conflicts with the retired qemu-block-gluster, and omarchy update fails on it every time.

Ask instead of guessing

Which package to drop is a decision rather than a cleanup: an upstream split retires one, but so does a package the user installed on purpose. An update already runs with someone watching — omarchy-update-confirm blocks on a gum confirm before anything starts, and the whole update runs on a pty — so the conflict handler runs the upgrade again with pacman asking, and the answer comes from whoever started it.

Nothing has to parse pacman's conflict output to do that, which matters more than it sounds: under --noconfirm pacman prints its questions to stdout, not stderr, so the error report the handler works from never contains them. Handing the question back sidesteps that, and covers provider selection and unknown signing keys for free.

-y is a promise not to ask anything, so it reports rather than prompts, as does a run with no terminal to prompt on. Neither can leave pacman sitting on a question nobody is there to answer. Since an upgrade that is not running --noconfirm puts its questions on stderr and reads the answers from stdin, those are the two streams that have to be a terminal — not stdout, which only carries progress bars.

The only other change to omarchy-update is exporting that flag, alongside a test that pins the order of its steps: migrations ship with the packages the upgrade installs and are written against them, so a blocked upgrade has to stop the update rather than migrate against what is still on disk.

Closes #6818. Replaces #6826, which took the other route: proving each removal safe and then answering pacman's prompt with --ask 4.

— 🤖 Claude, posting on behalf of @dhh

Copilot AI balanced review requested due to automatic review settings August 13, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Retries package conflicts interactively and allows later update phases to continue after package failures.

Changes:

  • Adds interactive conflict handling with unattended safeguards.
  • Defers package-failure reporting until update completion.
  • Adds conflict and partial-failure tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
bin/omarchy-update Continues after package failures and reports final status.
bin/omarchy-update-system-pkgs Adds the interactive pacman retry path.
bin/omarchy-update-system-pkgs-when-conflicted Detects package conflicts and delegates decisions.
test/shell.d/update-package-conflict-test.sh Tests conflict retry and terminal behavior.
test/shell.d/update-partial-failure-test.sh Tests sequencing and failure handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Pacman answers its own conflict question with No under --noconfirm, so one
retired package can stop every update after it. Which package to drop is a
decision rather than a cleanup, so run the upgrade again with pacman asking
when there is a terminal to answer on, and report instead when -y promised
not to ask.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dhh
dhh force-pushed the update-conflict-escalation branch from 0311212 to 206fae0 Compare August 13, 2026 20:20
Copilot AI review requested due to automatic review settings August 13, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 5 changed files in this pull request and generated no new comments.

@dhh dhh added this to the 4.1 milestone Aug 13, 2026
@dhh
dhh merged commit 5ca3030 into quattro Aug 14, 2026
4 checks passed
@dhh
dhh deleted the update-conflict-escalation branch August 14, 2026 07:08
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
Pacman answers its own conflict question with No under --noconfirm, so one
retired package can stop every update after it. Which package to drop is a
decision rather than a cleanup, so run the upgrade again with pacman asking
when there is a terminal to answer on, and report instead when -y promised
not to ask.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upstream qemu update blocks omarchy update

2 participants