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

binrepos.conf: Support "frozen" attribute #1329

Merged
merged 1 commit into from
May 25, 2024

Conversation

zmedico
Copy link
Member

@zmedico zmedico commented May 25, 2024

In order to allow consistent and reproducible dependency calculations during mixed source and binary updates, add a "frozen" binrepos.conf attribute which will freeze binrepo index updates and cause messsages to indicate that the repo is frozen rather than up-to-date:

Local copy of remote index is frozen and will be used.

This should only be set temporarily in order to guarantee consistent and reproducible dependency calculations for mixed binary and source updates.

Bug: https://bugs.gentoo.org/932739

@zmedico zmedico force-pushed the bug_932739_frozen_binrepos branch 2 times, most recently from 9718939 to 21aac68 Compare May 25, 2024 17:42
@zmedico zmedico requested a review from thesamesam May 25, 2024 17:51
Copy link
Member

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me a scenario where you'd use it? I can see it in theory but I can't yet see a time when I'd want to set it.

Or is the idea that we'll have some tooling for the other feature set it temporarily?

@zmedico
Copy link
Member Author

zmedico commented May 25, 2024

Can you give me a scenario where you'd use it? I can see it in theory but I can't yet see a time when I'd want to set it.

Or is the idea that we'll have some tooling for the other feature set it temporarily?

When performing mixed source / binary updates, there's a desire to have the binrepos in sync with the source tree, which REPO_REVISIONS will make possible. However, once you have your source repository in sync with you binrepos, it's highly desirable for them to stay in sync until you've completed your current batch of mixed source / binary updates. Otherwise, the binrepos state could start to diverge, leading to inconsistent dependency calculations which are not reproducible.

@thesamesam
Copy link
Member

Ah! Got it, thanks. It's something which has bothered me for ages (how you end up mutating state just by even e.g. emerge -p) but I never sat down and thought about. LGTM.

@zmedico
Copy link
Member Author

zmedico commented May 25, 2024

Ah! Got it, thanks. It's something which has bothered me for ages (how you end up mutating state just by even e.g. emerge -p) but I never sat down and thought about. LGTM.

I've recently switched to mixed source / binary updates, and when I saw how Amazon Linux used dnf releasever to hold back binary updates, I realized that we would need to hold back binary updates ourselves. For us, a frozen binrepo serves as a convenient alternative to a releasever (and REPO_REVISIONS will link a frozen binrepo to corresponding source repo state).

In order to allow consistent and reproducible dependency calculations
during mixed source and binary updates, add a "frozen" binrepos.conf
attribute which will freeze binrepo index updates and cause messsages
to indicate that the repo is frozen rather than up-to-date:

    Local copy of remote index is frozen and will be used.

This should only be set temporarily in order to guarantee consistent
and reproducible dependency calculations for mixed binary and source
updates.

Bug: https://bugs.gentoo.org/932739
Signed-off-by: Zac Medico <zmedico@gentoo.org>
@zmedico zmedico force-pushed the bug_932739_frozen_binrepos branch from 21aac68 to cd41fb9 Compare May 25, 2024 21:55
@gentoo-bot gentoo-bot merged commit cd41fb9 into gentoo:master May 25, 2024
13 checks passed
@zmedico zmedico deleted the bug_932739_frozen_binrepos branch May 25, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants