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

Autoinstall fixes #314

Merged
merged 19 commits into from
Apr 3, 2023
Merged

Autoinstall fixes #314

merged 19 commits into from
Apr 3, 2023

Conversation

anbe42
Copy link
Collaborator

@anbe42 anbe42 commented Mar 17, 2023

This is how I expect autoinstall to work in case of modules being skipped due to BUILD_EXCLUSIVE_*.

@anbe42 anbe42 force-pushed the autoinstall-fixes branch from 1ae57d1 to 7f25544 Compare March 19, 2023 14:09
@evelikov
Copy link
Collaborator

Huge thanks for the series - in general it looks good. There are a few of minor comments and I'm in favour of this landing with those addressed.

@anbe42 anbe42 force-pushed the autoinstall-fixes branch from 7f25544 to 74ae445 Compare March 20, 2023 17:17
@anbe42 anbe42 force-pushed the autoinstall-fixes branch from 74ae445 to 35f96c6 Compare March 23, 2023 13:20
@anbe42 anbe42 force-pushed the autoinstall-fixes branch 2 times, most recently from 796b3b7 to 6f610ac Compare March 31, 2023 15:12
@anbe42 anbe42 force-pushed the autoinstall-fixes branch 3 times, most recently from dba8761 to 5b00d90 Compare April 1, 2023 14:16
ensures that
* installed_modules does not contain duplicates
  (could happen if multiple kernels are installed)
* the intersection between installed_modules and to_install is empty
  (could happen if multiple versions of a dkms module are installed)
@anbe42 anbe42 force-pushed the autoinstall-fixes branch from ec3db42 to 1ae8b86 Compare April 1, 2023 19:22
@anbe42
Copy link
Collaborator Author

anbe42 commented Apr 1, 2023

after eliminating a lot of nondeterminism in the output, I finally got it all green ;-)

anbe42 added 12 commits April 2, 2023 21:28
the keys of an associative array have no defined order

this is no problem for regular operation, but tests that run
autoinstall to (try to) build multiple modules need a deterministic
ordering of the modules to produce deterministic output
error code 9 is used at multiple locations throughout the dkms code
to indicate different unrelated errors

error code 77 has been used by GNU autotest for skipped tests and was
later adopted by other testing frameworks
resolving skipped modules with dependencies may need multiple rounds
otherwise a module with a build_exclusive constraint can fail due to a
missing dependency, since build_exclusive is only evaluated after all
dependencies are satisfied

a build-exclusive module depending on another build-exclusive module
just needs the same (or a more strict) build-exclusive constraint
align the behavior with dkms_common.postinst which also skips the build
step if headers are not available

Before this change the following installation order succeeds (while
linux-headers-... is *not* installed) (Debian syntax):
  apt install linux-image-... && apt install ...-dkms
while the opposite order causes a failure:
  apt install ...-dkms && apt install linux-image-...
After this change both ways succeed.
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