omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

omarchy pkg install lists installed packages too, and picking one upgrades it without the snapshot or migrations

Open animadito opened this issue 1 month ago • 2 comments

System details

MacBook Pro A1502 (EMC 2835), Omarchy 4.0.6-1 (stable)

What's wrong?

omarchy pkg install describes itself as a picker for new packages:

# omarchy:summary=Show a fuzzy-finder TUI for picking new Arch and OPR packages to install.

It says new, and the listing it feeds to fzf does not filter for it. That listing comes from pacman -Slq, which covers every package in the sync databases whether or not it is installed. linux-omarchy, quickshell, omarchy, ripgrep and fd all appear in that output on this machine, and every one of them is already installed.

Selecting one runs:

sudo pacman -S --noconfirm <package>

Without --needed, pacman upgrades the installed package whenever the sync database holds a newer version.

The pacman guard does not catch this. It calls a command a direct system upgrade only when it sees both a sync flag and a sysupgrade flag, so pacman -S --noconfirm <package> passes as an ordinary install:

command guard
pacman -Syu aborts
pacman -Sy -u --print-format %n aborts
yay -Syu aborts
pacman -S --noconfirm <installed package> allowed

The upgrade then runs with no snapper snapshot, no migrations and no config updates, which is what manual/30-updates.md spells out in its "Warning about direct pacman/yay updates" section. Someone picking a package in a picker labelled new packages gets no signal that they asked for something else.

Two small fixes on the TUI side. Filtering the listing to packages that are not installed matches the summary. Passing --needed to the pacman call matches omarchy pkg add, which already uses --needed.

A wider gap sits underneath this one. The guard allows pacman -S <installed package> and pacman -Sy --needed <installed package> from a terminal as well, so any upgrade of a single package skips the snapshot and migrations, not only the ones that come through this picker. Whether the guard should treat an upgrade of an already-installed package as a system upgrade is a policy question about scope, and a Discussions post seems like the right place for it. That part is out of scope here. The picker bug stands on its own either way.

bin/omarchy-pkg-install is the same on stable 4.0.6-1 and on the current quattro branch, apart from one line that passes the exit status to omarchy-show-done.

animadito avatar Nov 03 '26 19:11 animadito

I read the report and checked the package picker and install helpers on current quattro. The picker still passes the full pacman -Slq list to fzf. PR #17483 already proposes a fix for this report.

GPT-6 in Codex (effort not exposed by this session) classified this as a bug. The configured second classifier, deepseek-v4p1-flash, returned no usable classification, so classification remains unsettled. No worker reproduction or full fix review ran, and no labels were added. This is waiting on the maintainer to resolve classification.

omarchybot avatar Nov 18 '26 19:11 omarchybot

Classification now agrees on bug. I checked current quattro, the install helper and pacman guard, and PR #17483 at fc82765a71f1936ab3ce5e524fae5e07faa4380a. That PR already links this issue and addresses the picker defect: it filters installed packages from the listing, including translated installation markers, and adds --needed. Filtering is what prevents selecting an outdated installed package; --needed alone would still allow its upgrade. The wider guard policy remains outside this report.

GPT-6 in Codex (effort not exposed by this session), Opus 5.5 High and muse-wonder via pi, thinking high checked the source and prior worker records. Both second reviewers agreed that the existing PR covers this report; independence is not guaranteed. No fresh worker reproduction ran in this issue session.

PR #17483 has recorded worker verification, but its CI currently fails with omarchy-shell is not running, also present in the recorded base run. This issue is waiting on the maintainer's handling of that PR.

omarchybot avatar Nov 23 '26 04:11 omarchybot