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

kargs: More cleanups #674

Merged
merged 3 commits into from
Jul 12, 2024
Merged

kargs: More cleanups #674

merged 3 commits into from
Jul 12, 2024

Conversation

cgwalters
Copy link
Collaborator

deploy: Centralize karg computation

I happened to be looking at this code for an unrelated reason.
We had 3 copies of the function calling karg computation.
But that can just be pushed to a much lower level, right
before we tell ostree what to do.

Signed-off-by: Colin Walters walters@verbum.org


kargs: Use merge deployment

This is in general for us right now a no-op, but is closer
to technically correct. In ostree the "merge deployment"
concept started out as "deployment we use for the original /etc"
which may be different from the booted deployment. For example,
when one wants to do a "factory reset", we want to start
from a fresh /etc.

The other important case here is when we're doing a fresh
install (or into a new stateroot) there may be no merge
deployment at all! It wouldn't be correct to look at /.

We only sidestep this issue right now because the install
logic bypasses this to directly gather kargs...and doesn't
use the same deploy API as inplace updates. But we
want to get closer to doing things that way.

Signed-off-by: Colin Walters walters@verbum.org


kargs: Use type inference

No need for explicit types in most of these places.

Signed-off-by: Colin Walters walters@verbum.org


I happened to be looking at this code for an unrelated reason.
We had 3 copies of the function calling karg computation.
But that can just be pushed to a much lower level, right
before we tell ostree what to do.

Signed-off-by: Colin Walters <walters@verbum.org>
This is in general for us right now a no-op, but is closer
to technically correct. In ostree the "merge deployment"
concept started out as "deployment we use for the original /etc"
which *may be different* from the booted deployment. For example,
when one wants to do a "factory reset", we want to start
from a fresh /etc.

The other important case here is when we're doing a fresh
install (or into a new stateroot) there may be no merge
deployment at all! It wouldn't be correct to look at `/`.

We only sidestep this issue right now because the install
logic bypasses this to directly gather kargs...and doesn't
use the same `deploy` API as inplace updates. But we
want to get closer to doing things that way.

Signed-off-by: Colin Walters <walters@verbum.org>
No need for explicit types in most of these places.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
Copy link
Collaborator Author

Fixed textual conflict with #675

@cgwalters cgwalters merged commit 26bc174 into containers:main Jul 12, 2024
21 of 27 checks passed
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.

2 participants