summaryrefslogtreecommitdiffstats
path: root/tests/dispatch.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-18 09:12:28 +0000
committeraur-build <aur-build@localhost>2026-11-18 09:12:28 +0000
commitd9c8402180749df4452dc37febace4d933b8407d (patch)
tree377a7b89203c266d00a714845b50d27febbda4c7 /tests/dispatch.rs
parent4cb2f4c7b68dceaed8f7ffbd8f0db3cfbf3f1ddc (diff)
downloadaur-build-d9c8402180749df4452dc37febace4d933b8407d.tar.gz
aur-build-d9c8402180749df4452dc37febace4d933b8407d.zip
pkginfo: .PKGINFO/.BUILDINFO parsing gets a real home, and a parser bug fix (§10.1)
Ingest decides what the index claims about a package and what the world snapshot records by reading two text files out of a tar inside a zstd stream. That code was living in src/shims — the test harness — which meant production depended on the harness for its view of a package's own metadata. Moved to src/pkginfo.rs, with the shim now delegating to it so the harness and the production path cannot disagree about what a package says about itself. Still no libalpm: tar + zstd + eighty lines of key = value parsing. Unknown keys are ignored rather than rejected, because makepkg adds fields over time and a new one must not stop us publishing. **The parser had a real bug.** A .BUILDINFO installed block puts its first entry on the same line as the key: installed = glibc 2.39-1 x86_64 - gmp 6.3.0-1 x86_64 - The old code skipped the header line, so the first dependency was silently dropped from every snapshot — exactly the kind of gap that makes staleness quietly wrong. The header line is parsed now. tests/world.rs builds real .pkg.tar.zst files and asserts the fields come out of the archive: repeated keys stay lists, an archive with no .PKGINFO is refused rather than defaulted from the filename, and the world snapshot contains our own packages and none of glibc/pacman/binutils. The empty-snapshot case for a first build is asserted too — nothing of ours existed yet, and recording that honestly beats inventing a world. Split pkgbases produce one approval, one release and N index rows each with its own artifact, asserted directly here. 143 tests pass, clippy clean.
Diffstat (limited to 'tests/dispatch.rs')
0 files changed, 0 insertions, 0 deletions