Push every output of a selected pkgbase

--package meant a pkgbase to bin/build and a literal package name to
bin/push-build, so deploy --package nvidia-580xx-utils built three packages and
published one, leaving nvidia-580xx-dkms and opencl-nvidia-580xx behind with no
indication anything was missing. Hit while deploying exactly that package.

Selection now matches on the pkgbase recorded in .PKGINFO as well as on the
package name, so a pkgbase ships all of its outputs and an individual name
still selects just that one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Opus 5 committed 2026-08-12 04:24:38 -07:00
1 parent 9cf3794713
commit ca90a19d73
2 files changed
+24 -10

No files matched your search

+5 -3
View File
@@ -228,9 +228,11 @@ setting is named for the repository rather than for building, which happens
wherever you like. The same setting tells `bin/omarchy-pkgs release` which host wherever you like. The same setting tells `bin/omarchy-pkgs release` which host
to poke after a release push. to poke after a release push.
Split packages are selected by their own names, not their pkgbase — pushing `--package` means the same thing as it does to `build`: a pkgbase, whose every
`nvidia-580xx-utils` does not carry `nvidia-580xx-dkms` along. Omit `--package` to output ships together. Pushing `nvidia-580xx-utils` carries `nvidia-580xx-dkms`
push everything built. and `opencl-nvidia-580xx` with it, because that is what the build produced. An
output's own name still selects just that one, for publishing a single package
on purpose. Omit `--package` to push everything built.
Publishing signs and promotes everything staged on the host, not just what this Publishing signs and promotes everything staged on the host, not just what this
push uploaded, so `push` stops when it finds packages already staged there — push uploaded, so `push` stops when it finds packages already staged there —
+19 -7
View File
@@ -143,29 +143,41 @@ if [[ -z "$PACKAGES" && "$ASSUME_YES" == true ]] && ! on_repo_host; then
exit 1 exit 1
fi fi
# --package means the same thing here as it does to bin/build: a pkgbase, whose
# every output ships together. Selecting only the artifact whose filename matched
# would publish one third of a split package like nvidia-580xx-utils and silently
# leave nvidia-580xx-dkms and opencl-nvidia-580xx behind. An output's own name
# still matches, for pushing just one of them on purpose.
#
# pkgbase comes from .PKGINFO rather than the PKGBUILD: it is what makepkg
# actually recorded, and it needs no guessing about which directory built what.
pkgbase_of() {
bsdtar -xOf "$1" .PKGINFO 2>/dev/null |
awk -F ' = ' '$1 == "pkgbase" { print $2; exit }'
}
FILES=() FILES=()
if [[ -z "$PACKAGES" ]]; then if [[ -z "$PACKAGES" ]]; then
FILES=("${ALL_FILES[@]}") FILES=("${ALL_FILES[@]}")
else else
declare -A MATCHED=()
for file in "${ALL_FILES[@]}"; do for file in "${ALL_FILES[@]}"; do
# name-version-release-arch.pkg.tar.zst -> name # name-version-release-arch.pkg.tar.zst -> name
pkgname="${file%-*-*-*.pkg.tar.*}" pkgname="${file%-*-*-*.pkg.tar.*}"
pkgbase=$(pkgbase_of "$BUILD_OUTPUT_DIR/$file")
for wanted in $PACKAGES; do for wanted in $PACKAGES; do
if [[ "$pkgname" == "$wanted" ]]; then if [[ "$pkgname" == "$wanted" || "$pkgbase" == "$wanted" ]]; then
FILES+=("$file") FILES+=("$file")
MATCHED["$wanted"]=1
break break
fi fi
done done
done done
for wanted in $PACKAGES; do for wanted in $PACKAGES; do
found=false if [[ -z "${MATCHED[$wanted]:-}" ]]; then
for file in "${FILES[@]}"; do
[[ "${file%-*-*-*.pkg.tar.*}" == "$wanted" ]] && found=true && break
done
if [[ "$found" != true ]]; then
print_error "No built artifact for '$wanted' in $BUILD_OUTPUT_DIR" print_error "No built artifact for '$wanted' in $BUILD_OUTPUT_DIR"
print_warning "Split packages are named after their outputs, not their pkgbase" print_warning "Name a package or the pkgbase it was built from"
exit 1 exit 1
fi fi
done done