Skip to content

dkms: fix ldtarball loading only one kernel from a multi-kernel tarball - #612

Merged
scaronni merged 1 commit into
dkms-project:mainfrom
jfhs:fix-ldtarball
Oct 15, 2026
Merged

scaronni merged 1 commit into
dkms-project:mainfrom
jfhs:fix-ldtarball

Conversation

@jfhs

@jfhs jfhs commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

load_tarball() declared kernel_arch_to_load and dkms_dir_location with local -r inside the loop over dkms_main_tree/*/*. Bash cannot re-declare a readonly variable, so from the second iteration on both kept the values of the first kernel/arch directory. Without --force every further kernel was skipped with a misleading "already exists" warning; with --force each was copied over the first kernel's directory, registering modules built for one kernel under another.

Drop -r, same as was done for make_tarball() in #453.

Add a mktarball/ldtarball round-trip test with three kernels (two of them fake copies of the real build), with and without --force, which covers both fixes.

load_tarball() declared kernel_arch_to_load and dkms_dir_location with
`local -r` inside the loop over dkms_main_tree/*/*. Bash cannot re-declare
a readonly variable, so from the second iteration on both kept the values
of the first kernel/arch directory. Without --force every further kernel
was skipped with a misleading "already exists" warning; with --force each
was copied over the first kernel's directory, registering modules built
for one kernel under another.

Drop -r, same as was done for make_tarball() in dkms-project#453.

Add a mktarball/ldtarball round-trip test with three kernels (two of
them fake copies of the real build), with and without --force, which
covers both fixes.
@scaronni
scaronni merged commit 7e20e65 into dkms-project:main Oct 15, 2026
31 checks passed
@scaronni

Copy link
Copy Markdown
Member

Thank you!

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