Skip to content

perf: derive file maps from pinned debs - #269

Open
zbarsky-openai wants to merge 3 commits into
bazel-contrib:mainfrom
zbarsky-openai:zbarsky/apt-lazy-filemaps
Open

zbarsky-openai wants to merge 3 commits into
bazel-contrib:mainfrom
zbarsky-openai:zbarsky/apt-lazy-filemaps

Conversation

@zbarsky-openai

Copy link
Copy Markdown
Contributor

Derive dependency file maps from the exact hash-pinned Debian archives
when those maps are needed. Distribution-wide Contents indexes may be
absent from third-party repositories and do not identify the selected
package version.

Remove eager Contents downloads, parsing, and state. Keep file-map
repositories separate from package imports to preserve support for
circular Debian dependency graphs. Use hermetic bsdtar for inspection and
delete the temporary archive afterward.

This trades distribution-wide index work for inspection of the package
archives needed by the build and avoids embedding file lists in generated
module-lock repository specifications.

Depends on #266 and #267. The branch includes those prerequisites; the
file-map change is commit cab5491.

Use tar.bzl's pinned host binary during repository evaluation. Discover
the data archive instead of assuming XZ compression, so Zstandard debs
work without host tar or zstd. Remove directory exclusions that suppress
file discovery with BSD tar, and report inspection/extraction failures.
Keep indexes from different URLs separate even when suite, component,
and architecture match. Scope snapshot facts by source URL and retain
the selected package's URLs instead of reconstructing them from the
suite. Continue reading existing v2 locks and refresh their provenance
when packages are resolved. Cover mixed snapshot/rolling sources and
package URLs that differ from the suite's URLs.
Inspect the exact selected Debian archive only when a dependency file
map is needed. Avoid downloading and parsing distribution-wide Contents
indexes, which third-party apt repositories may not publish and which
do not identify the selected package version. Delete the temporary
archive after inspection and remove the unused Contents parser.
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.

1 participant