Add deferred logic for BUILD_DEPENDS#587
Merged
Merged
Conversation
zeroepoch
approved these changes
May 8, 2026
…o the dependent module fails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add deferred logic for
BUILD_DEPENDSwith multiple package upgrades (kernel, modules and dependent modules) when invokingautoinstall.The issue
Practical issue in Ubuntu:
nvidiaDKMS module at the same time:nvidia-fs, which now succeeds because thenvidiamodule has now been built:But at this point, the initial failure causes the
apttransaction to report a failure:Deferred logic for hard dependencies
autoinstallnow distinguishes two kinds of unresolvedBUILD_DEPENDS(taken from the comments indkms.in):"real" missing dependency:
The dependency is a DKMS-managed module (in
known_modules) that we tried but could not install (e.g. circular dependency, build failure of the dependency)."deferred" missing dependency:
The dependency is not registered with DKMS at all. This commonly happens during multi-package installs where the dependency's source package has not yet been configured by
dpkg/rpm, so itspostinsthasn't rundkms addyet. The dependency may also be supplied by something outside DKMS entirely. Either way, the currentautoinstallrun cannot make progress on it, but a later trigger (the dependency package's ownpostinst, or a re-run of this hook) will. Don't fail the whole transaction in that case.By running
dkms builddirectly, as it was before, exit 13 is still returned unless--forceis used. The relaxation (the deferred logic) is only on the automated path where DKMS doesn't have full visibility into pending package operations.