Skip to content

fix(apt): mark deb_import repos reproducible - #279

Open
kevinpark1217 wants to merge 1 commit into
bazel-contrib:mainfrom
kevinpark1217:deb-import-reproducible
Open

kevinpark1217 wants to merge 1 commit into
bazel-contrib:mainfrom
kevinpark1217:deb-import-reproducible

Conversation

@kevinpark1217

@kevinpark1217 kevinpark1217 commented Sep 25, 2026 •

Copy link
Copy Markdown

Fixes #277.

deb_import now returns rctx.repo_metadata(reproducible = True), so its repos enter Bazel's repo contents cache (8.3+) and a fresh output base reuses them instead of re-fetching every .deb. The hasattr guard makes it a no-op on older Bazel.

The linker-script grep now fails on exit code > 1. Before this, a grep error silently dropped the --remap-inputs, and now that result would be cached.

Test

  • bazel test //... passes on 8.5.1.
  • Issue's repro (plus libbsd-dev for the linker-script path) on 8.5.1 with two fresh output bases sharing one --repo_contents_cache: every deb_import repo in both is a symlink to the same cache entry, and libbsd's remap is intact.
  • On 7.7.1 the same repos fetch as before.

Return repo_metadata(reproducible = True) so deb_import repos enter
Bazel's repo contents cache, and fail when the linker-script grep errors
so a bad scan is never cached.

Fixes bazel-contrib#277
@kevinpark1217

kevinpark1217 commented Oct 1, 2026 •

Copy link
Copy Markdown
Author

@thesayyn Hello! Would it be possible to get a review?

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.

deb_import repos never enter Bazel's repo contents cache (missing repo_metadata(reproducible = True))

1 participant