Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-invalidate bootstrap cache upon mock config change #1289

Open
praiskup opened this issue Jan 16, 2024 · 4 comments
Open

Self-invalidate bootstrap cache upon mock config change #1289

praiskup opened this issue Jan 16, 2024 · 4 comments
Labels
enhancement feature request, rfe

Comments

@praiskup
Copy link
Member

Mock should mock --scrub=bootstrap (plus bootstrap root cache) when some of the
config files affecting target chroot (the -r option) changes.

Originally requested here: https://bugzilla.redhat.com/show_bug.cgi?id=2258570

@github-project-automation github-project-automation bot moved this to Needs triage in CPT Kanban Jan 16, 2024
@praiskup praiskup moved this from Needs triage to In 2 years in CPT Kanban Jan 17, 2024
@praiskup praiskup added the enhancement feature request, rfe label Jan 24, 2024
@praiskup
Copy link
Member Author

Re-reported here: https://bugzilla.redhat.com/show_bug.cgi?id=2263260

@praiskup
Copy link
Member Author

@praiskup
Copy link
Member Author

Brain dump:

  • the commands.clean() is called before the build happens (rebuild_generic)
  • the commands.clean() is called before --init (if not configured otherwise)
  • the commands.clean() doesn't call bootstrap.delete() yet, see The --scrub= and --clean affects bootstrap, too #1454
  • root cache is created for bootstrap chroot
  • bootstrap image is downloaded and extracted only if not yet initialized
  • bootstrap image is not downloaded and extracted in case of root cache hit (extracting root cache makes the buildroot into the "was_initialized" state
  • bootstrap_image_ready means that many options have no effect on bootstrap at all

All that said, the cache invalidation already exists. But! Because commands.clean() doesn't affect bootstrap (yet?), it has no effect. And, even if we invalidate the caches -> bootstrap image extraction would probably override most of the things (unless --no-bootstrap-image is specified).

@praiskup
Copy link
Member Author

Ohh, and:

  • The --scrub=root-cache is not cleaning the bootstrap root cache.
  • The --scrub=yum-cache is not scrubbing bootstrap yum, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request, rfe
Projects
None yet
Development

No branches or pull requests

1 participant