Skip to content

Conversation

@anbe42
Copy link
Collaborator

@anbe42 anbe42 commented Apr 9, 2025

Previous changes (using a tempdir in do_build) should have reduced the likelyhood that dkms gets stuck with an incomplete $m/$v/$k/$a/module/ directory.
But it didn't solve the case if dkms is already in such a state. is_module_built would return false and remove_module therefore does nothing, while do_build will refuse to do anything because the directory already exists.
Relax the check in is_module_built (there will be more thorough checks for completeness in do_install) to allow remove_module to clean up the mess.

anbe42 added 4 commits April 5, 2025 14:10
is_module_built currently calls set_module_suffix and read_conf which
sets lots of variables as a side effect. Explicitly call these from the
respective do_whatever functions where they are needed.
…odule/ tree

'dkms remove --all' cannot clean that up (the module is not considered
built for $k/$a), leaving it in added state and causing a subsequent
'dkms add' or 'dkms build' to fail
do not check the content of the directory for completeness on normal
usage to allow e.g. removal of incomplete ones
do_build tries hard not to create incomplete $m/$v/$k/$a/module/ trees
do_install checks for completeness before starting to copy files
module_status_built_extra checks for missing modules, too
@anbe42 anbe42 requested a review from scaronni April 9, 2025 16:20
@scaronni scaronni self-assigned this Apr 10, 2025
@scaronni scaronni merged commit b6a934f into dkms-project:main Apr 10, 2025
26 checks passed
@scaronni
Copy link
Member

Awesome, thanks!

@anbe42 anbe42 deleted the incomplete-build branch April 14, 2025 19:33
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