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

dracut: depend on net-lib not ifcfg #6125

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dracut/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ check() {
}

depends() {
echo livenet nfs img-lib convertfs ifcfg
echo livenet nfs img-lib convertfs net-lib
Copy link

Choose a reason for hiding this comment

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

I do not mean to slow down progress here, but this could be further simplified to
livenet nfs convertfs .

img-lib and net-lib are already transitive dependencies of livenet.

Keeping the list of dependencies to the "top level" dracut modules, could avoid future compat issues like this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

personally, I subscribe to the opinion that direct dependencies should always be explicit. Assuming anaconda directly uses img-lib, it is correct for anaconda to have a direct dep on it. Relying on transitive dependencies is fundamentally unsafe - sure, livenet uses img-lib now, but what if livenet is later changed upstream to not use img-lib? anaconda would suddenly break.

Copy link

Choose a reason for hiding this comment

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

@AdamWill agreed. It seems img-lib is directly used, but net-lib is not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as noted in the commit message, the anaconda module uses save_netinfo, which is from net-lib.

Copy link

Choose a reason for hiding this comment

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

Thanks.

In that case I would have also sourced net-lib from anaconda-ifcfg.sh (which is why I missed it).

Also noticed that anaconda-lib.sh sources url-lib which might warrant to have url-lib listed as a direct dependency.

These changes might be out of scope for this kind of unblocking PR..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, i think those are out of scope for this PR.

case "$(uname -m)" in
s390*) echo cms ;;
esac
Expand Down