Skip to content

Vendor the pacman-packages block - #3050

Open
jeremy wants to merge 5 commits into
mainfrom
percona-mysql-client
Open

Vendor the pacman-packages block#3050
jeremy wants to merge 5 commits into
mainfrom
percona-mysql-client

Conversation

@jeremy

@jeremy jeremy commented Aug 19, 2026

Copy link
Copy Markdown
Member

Vendors the shared pacman-packages block so any already-installed provider is accepted.

Why

pacman satisfies a declared name from any installed provider, and answers under the provider's name. mise matches names exactly, so a provider-satisfied declaration reads as missing and mise hands pacman a package that conflicts with the provider already installed — mariadb-clients, mariadb-lts-clients and percona-server-clients all provide mysql-clients and all own /usr/bin/mysql, so pacman refuses to add a second and bin/setup aborts.

Reported upstream as jdx/mise#12181 and fixed by jdx/mise#12183, which is merged to mise master but not in any release yet (latest is v2026.8.8, from before the merge).

Why the block is still needed after that lands

The provides are asymmetric. percona-server-clients provides mariadb-clients, but nothing provides percona's own name:

$ expac -Ss '%n provides: %S' percona-server-clients
mariadb-clients        provides: mysql-clients
mariadb-lts-clients    provides: mariadb-clients  mysql-clients
percona-server-clients provides: mysql-clients  mariadb-clients

So declaring percona is unsatisfiable for anyone already running mariadb-clients, no matter how well mise resolves provides. The block tests the mysql-clients virtual instead, which every provider satisfies.

Declaring the virtual directly instead was considered and rejected: on a fresh box pacman -S --noconfirm mysql-clients resolves to mariadb-clients, so it would silently stop being percona on new machines.

Shape

The block is canonical in shipyard (share/setup-blocks/pacman-packages v1) and vendored here byte-for-byte, per the standalone constraint — app setups run on fresh machines before any shipyard checkout exists. It defines functions only, at column 0, so the same bytes vendor into every app regardless of how each one indents its call site. bin/audit-fleet-setup covers it.

Verified

  • audit_block reports clean against the canonical copy.
  • bash -n bin/setup passes.
  • The normalized pacman split matches test/mise-floor-test's expected_split, and mise bootstrap packages apply still appears exactly twice (one in the block, one in the else arm).
  • Block behavior is covered by test/pacman-packages-test in shipyard, which runs the extracted canonical bytes against pacman/mise shims — including the asymmetry case. That test was mutation-checked: deleting the mysql-clients rewrite makes it fail.

bin/setup was not run end to end.

fizzy declares no mysql client, so the block is inert here today — pacman:mariadb-libs is the connector library, which percona neither provides nor conflicts with. It is vendored for shape parity: test/mise-floor-test asserts every app's pacman split is identical, so fizzy has to move with the fleet.

Depends on basecamp/shipyard#175, which carries the canonical block and its test.

jeremy added 2 commits August 19, 2026 12:15
pacman satisfies a declared name from any installed provider, but mise matches
names exactly, so a provider-satisfied declaration reads as missing and pacman
is handed a conflicting install. Vendor the shared block so the packages phase
skips declarations pacman already considers satisfied, keeping the fleet's
setup shape identical across apps.

fizzy declares no mysql client, so the block is inert here today; it is
vendored for shape parity.
Re-vendors the corrected pacman-packages block. Reading the status run through
a process substitution swallowed its failure, so a broken run reported every
declared package installed instead of aborting, and a pacman error read as
"missing" rather than as a failure to answer.
Copilot AI balanced review requested due to automatic review settings August 19, 2026 22:29

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.

Copilot wasn't able to review any files in this pull request.


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

Re-vendors the corrected pacman-packages block. mise bootstrap packages status
takes no --manager and reports every manager, so failing on its exit status let
an unrelated manager's failure abort a pacman run. Abort only when pacman rows
are missing too.
Copilot AI review requested due to automatic review settings August 19, 2026 22:56

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.

Copilot wasn't able to review any files in this pull request.

@jeremy

jeremy commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Updated — re-vendors the corrected pacman-packages block from basecamp/shipyard#175, which now keeps the packages phase scoped to pacman.

mise bootstrap packages status takes no --manager and reports every manager, so failing the phase on its exit status let an unrelated manager (brew, apt) abort a pacman run — something the apply --manager pacman this replaced could not do. It now aborts only when the status run failed and no pacman rows came through.

Vendored copy re-audits clean against canonical, bash -n passes, the apply count stays at 2, and the pacman split still matches expected_split.

Re-vendors the corrected pacman-packages block. status renders a pin as
name@version, which is not the dependency syntax pacman -T reads, and pacman
cannot install a pinned version — so a satisfied pin read as missing and pacman
was handed an operand it cannot resolve.
Copilot AI review requested due to automatic review settings August 20, 2026 00:10

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.

Copilot wasn't able to review any files in this pull request.

@jeremy

jeremy commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Updated — re-vendors the corrected pacman-packages block from basecamp/shipyard#175.

mise bootstrap packages status renders a pinned declaration as name@version, which is not the dependency syntax pacman -T reads, and pacman cannot install a pinned version at all. The block derived its own verdict from that token, so a satisfied pin read as missing and pacman was handed an operand it cannot resolve. Pinned rows now take mise's verdict: installed ones are skipped, anything else fails loudly.

No repo in the fleet pins a pacman package today, so this is latent rather than active. Vendored copy re-audits clean, bash -n passes, apply count stays at 2, split still matches.

Re-vendors the corrected pacman-packages block. status takes no --manager and
gives up on the first manager that errors, so an unrelated manager could abort a
pacman run. Scope the query with the setting's own env var so excluded managers
are never queried.
Copilot AI review requested due to automatic review settings August 20, 2026 00:19

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.

Copilot wasn't able to review any files in this pull request.

@jeremy

jeremy commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Updated — re-vendors the corrected pacman-packages block from basecamp/shipyard#175.

mise bootstrap packages status takes no --manager and gives up on the first manager that errors, so an unrelated manager (brew and apt are queried first) could abort a pacman run — something the apply --manager pacman this replaced could not do. The query is now scoped with MISE_SYSTEM_PACKAGES_MANAGERS=pacman, so excluded managers are reported as skipped and never queried.

Vendored copy re-audits clean, bash -n passes, apply count stays at 2, split still matches.

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.

2 participants