Skip to content

fix: isolate Apple package build outputs - #247

Merged
scottjones merged 2 commits into
omacom:quattrofrom
dl-alexandre:fix/package-output-retry
Aug 31, 2026
Merged

scottjones merged 2 commits into
omacom:quattrofrom
dl-alexandre:fix/package-output-retry

Conversation

@dl-alexandre

Copy link
Copy Markdown

Summary

  • clear prior package archives before a fresh Apple Silicon build
  • ignore detached .sig files when moving and installing packages
  • add regression coverage for the package hand-off

Verification

  • test/shell.d/install-mac-test.sh
  • test/shell.d/aarch64-packages-test.sh
  • test/shell.d/install-stage-wiring-test.sh
  • test/shell.d/upgrade-to-quattro-mac-test.sh
  • bash -n and ShellCheck on changed scripts
  • git diff --check

@scottjones

Copy link
Copy Markdown
Collaborator

Both fixes are real. A configured makepkg signer leaves *.pkg.tar.zst.sig beside the archive, the old glob swept those up, and pacman -U on a detached signature fails — anyone with GPGKEY set in makepkg.conf hits it. And clearing the hand-off directory before a rebuild matters because install.sh globs it: a retry after PKGBUILD changes would otherwise offer pacman two versions of the same package.

The conflict is mechanical. build-packages.sh and install.sh merge cleanly against current quattro; only test/shell.d/install-mac-test.sh conflicts, because the hotfix-rebuild assertions landed in the same spot after you branched. The two blocks are unrelated and additive — I merged quattro locally and kept both, and everything passes:

install-mac-test.sh             PASS
aarch64-packages-test.sh        PASS
install-stage-wiring-test.sh    PASS
upgrade-to-quattro-mac-test.sh  PASS

So a git merge quattro, keep both hunks, and this is mergeable.

One gap while you are in there. I mutation-tested both halves:

  • removing the .sig filter → install-mac-test.sh fails, good
  • removing the remove_old_packages call from main → still passes

The function is covered, but nothing asserts that the build calls it, so someone could drop the call and the suite would stay green. Comparing line numbers the way upgrade-to-quattro-mac-test.sh pins its ordering would close it — assert remove_old_packages appears in main before the build_package loop.

@dl-alexandre
dl-alexandre force-pushed the fix/package-output-retry branch from f0ea39c to 8b79eb0 Compare August 30, 2026 03:49
@dl-alexandre

Copy link
Copy Markdown
Author

Thanks for the review — I rebased this on the current quattro branch, kept both fix blocks, and added coverage confirming old package archives are cleared before the package loop. The focused installer/package tests pass. Please take another look when you have a chance!

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Both halves are pinned now: removing the .sig filter fails the test, and so does removing the remove_old_packages call from main — the gap from the last pass, closed by the ordering assertion. The test-file conflict is gone too; it merges cleanly against current quattro.

Both fixes are real. A configured makepkg signer leaves *.pkg.tar.zst.sig beside the archive and the old glob swept those into pacman -U, which anyone with GPGKEY set hits. And clearing the hand-off directory before a rebuild matters because install.sh globs it — a retry after PKGBUILD changes would otherwise offer pacman two versions of the same package.

Not exercised end to end: no actual package build here, so this rests on the tests plus reading the scripts.

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