Repository navigation
Conversation
--from-main copies the gitignored prebuilt binaries into out/publish-tree with git ls-files | grep -z /prebuilt/ | rsync. In a checkout that has none (a fresh clone, or one where nothing has been built), grep finds no match and exits 1; under set -euo pipefail that ends the script with no message before it hands over to the clean tree, so nothing is built or published. git now selects the files itself with the pathspec ':(glob)packages/**/prebuilt/**', which picks the same names the grep did and exits 0 when there are none; rsync then gets an empty list and copies nothing. A failing git ls-files or rsync still stops the script before the publisher runs. tests/repo-publish runs the block in a fixture repository: the real git lists the inventory and the real rsync copies it, a stand-in git answers fetch, checkout and clean, and a stand-in publisher in the fixture's out/publish-tree records its arguments. It covers no ignored files, ignored files with none under prebuilt/, prebuilt names with a space and a newline at two depths, a git ls-files that fails at once (a corrupt index) or after some names, and a failing rsync. CI's Arch container gets rsync so the test runs there. Tested on the laptop (no phone; the script never runs on one): tests/repo-publish passes on this commit and fails at its first case on the parent; mutants that swallow the git or rsync status each fail it; the pathspec and the old grep select the same files from a tree of awkward names. tools/pr-check and tests/all pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. This is right: I ran Since this is the publisher, I'll also do one |
|
A note on the red CI run here: the failure is #313 changed |
The check greps tools/repo-publish's source for the old grep -zE filter, which #289's pathspec replaces. On a checkout with cheetah's boot files staged, the old filter and the new pathspec list the same files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es (#289) (#476) repo-publish --from-main copies the gitignored prebuilt binaries and boot files into its clean origin/main checkout. It listed them with git ls-files piped through grep -z, and grep exits 1 on an empty list, so under pipefail a checkout with none stopped the publish. A git pathspec now picks them (packages/**/prebuilt/** and packages/**/boot-files/**), and an empty list copies nothing. tests/repo-publish covers the empty inventory, NUL-separated names, and an inventory or copy that fails partway, each stopping before anything is published. On a checkout with cheetah's boot files staged, the old filter and the new pathspec list the same files. Co-Authored-By: Victor Vogel <satsdev@only21mil.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged through #476 with the conflicts against main resolved (and its boot-files/ copy kept), you credited as co-author. Thank you, @only21mil! |
|
You're welcome my friend. Glad I can help! |
…es (derekross#289) (derekross#476) repo-publish --from-main copies the gitignored prebuilt binaries and boot files into its clean origin/main checkout. It listed them with git ls-files piped through grep -z, and grep exits 1 on an empty list, so under pipefail a checkout with none stopped the publish. A git pathspec now picks them (packages/**/prebuilt/** and packages/**/boot-files/**), and an empty list copies nothing. tests/repo-publish covers the empty inventory, NUL-separated names, and an inventory or copy that fails partway, each stopping before anything is published. On a checkout with cheetah's boot files staged, the old filter and the new pathspec list the same files. Co-Authored-By: Victor Vogel <satsdev@only21mil.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
tools/repo-publish --from-maincopies the gitignored prebuilt binaries (packages/*/…/prebuilt/) intoout/publish-treewithgit ls-files | grep -z /prebuilt/ | rsync, then hands over to the clean tree's publisher. In a checkout with no prebuilt files (a fresh clone, or one where nothing has been built), grep finds no match and exits 1. Underset -euo pipefailthat ends the script before the hand-over, with no message, so nothing is built or published. Related: #109. The build machine has its prebuilts, so this isn't the 10-28 failure there; it bites any checkout without them.git now selects the files itself with the pathspec
':(glob)packages/**/prebuilt/**'. On a test tree of awkward names it picks exactly the files the grep did, and it exits 0 when there are none; rsync then gets an empty list and copies nothing. A failinggit ls-filesor rsync still stops the script before the publisher runs.tests/repo-publish(new, intests/all) runs the block in a fixture repository. The real git lists the inventory and the real rsync copies it; a stand-in git answers fetch, checkout and clean, and a stand-in publisher in the fixture'sout/publish-treerecords its arguments. Nothing is fetched, built, signed or published, and no worktree is created. It covers:prebuilt/;git ls-filesfailing at once (a corrupt index) or after some names;CI's Arch container gets
rsync; without it the new test would always skip there.Found by: Sol 6.1 High / Priority; Terra 6.1 Max / Priority; Sol 6.1 xhigh / Priority (r2). Records: SOL-RELEASE-BUILD-008, TERRA-BUILD_INSTALL-015, SOL-XHIGH-R2:release_build:SOL61XH-R2-RB-027.
Device and build
tools/repo-publishruns on the maintainer's machine, never on a phone)uname -r): n/aChecks (no phone needed)
tools/pr-checkpasses (against the base, af8c0f0)tests/allpasses. Skipped on this laptop for missing tools: the Docker end-to-end run, AOSP mkbootimg, dtc, lz4, the rootfs smoke testtests/packages: not run, no package touchedversionbumped: n/a, no package changedCo-Authored-By:trailerAlso: the new test fails at its first case against the parent's
tools/repo-publish; mutants that swallow the git or rsync status each fail it.On the phone
--from-mainrun (it fetches origin and publishes), the CI container itself, and an environment withGIT_LITERAL_PATHSPECS=1orGIT_ICASE_PATHSPECS=1set. The pathspec selects nothing under the first and also takesPrebuilt/under the second; the publish timer sets neither.userdata, weakens the storage guard, or reads registers from userspaceGenerated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly