-
Notifications
You must be signed in to change notification settings - Fork 57
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
fedora: allow disabling weak dependencies #1252
base: main
Are you sure you want to change the base?
Conversation
The inverted logic is necessary for "backwards compatibility" or just to map the default behavior better? I.e. disableWeakDeps=false is actually weakDeps=true |
I did it because the |
I'll be moving this to draft so it can be rewritten to use image config(s) as per @thozza / @achilleas-k 's request. |
Undrafting again. I gave it some thought and I'd prefer to merge as-is unless there are problems. Moving this to image configs in a nice way requires a bunch of thought and it'd be nice to build images more quickly in the shorter term, especially with risc-v cross compilation and then do a follow up after :) |
A previous version of this PR changed the images API or behaviour causing integration issues with osbuild-composer. |
Huh, why? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to move the option to ImageConfig
and have the logic to not install weak deps in the image type generator function (which does not exist yet in Fedora).
pkg/distro/fedora/images.go
Outdated
// We only support disabling weak dependencies starting at Fedora 43, this is to | ||
// ensure that we don't break older images when/if this toggle is added to an image. | ||
if common.VersionGreaterThanOrEqual(d.osVersion, VERSION_WEAKDEPS) && t.disableWeakDeps { | ||
img.InstallWeakDeps = common.ToPtr(false) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like these conditionals in the ImageKind
generator function. Especially since this will become a problem once we consolidate the implementation across fedora and rhel.
I'd suggest to move this to the ImageConfig
and instead set it in the image type's default ImageConfig
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've adjusted this PR to move InstallWeakDeps
into the ImageConfig
instead.
e6dcedd
to
d57566c
Compare
So, I'm a bit confused here @thozza this PR seems like it really shouldn't touch RHEL yet we now have a missing package (or script) on RHEL which makes it seem that The same happens for Fedora. I'm not entirely sure because the default is still the same and I'm only setting this to false on minimal? My guess is something about how the As an aside, it seems wise if the FIPS customization would add |
I've adjusted the code to always take |
Weak dependency resolution is hardcoded per imagetype. This commit changes it so weak dependency resolution can be turned off per image. Then we set weak dependency resolution to true for all distros, but turn it off again for Fedora Minimal >= 43. Signed-off-by: Simon de Vlieger <[email protected]>
Cool, all is good in this PR now as far as I can see :) |
Weak dependency resolution is hardcoded per imagetype. This commit changes it so weak dependency resolution can be turned off per image.
We guard on the Fedora version to ensure we don't accidentally change older images.
This commit also disables weak dependency resolution for Fedora Minimal which I have mentioned here.