Bug: run-parts called with multiple directories in mainline kernel 7.0.0 package scripts
Oliver Pauletto
oliver at pauletto.ch
Mon Apr 13 13:53:37 UTC 2026
Hello,
I would like to report a bug in the mainline kernel packages for version 7.0.0 (and also present in 6.19.11).
The preinst, postinst, postrm, and header_postinst scripts in the following packages call run-parts with two directory arguments simultaneously:
linux-image-unsigned-7.0.0-070000-generic_7.0.0-070000.202604122140_amd64.deb
linux-headers-7.0.0-070000-generic_7.0.0-070000.202604122140_amd64.deb
Example from preinst:
run-parts --report --exit-on-error --arg=$version \
--arg=$image_path /etc/kernel/preinst.d /usr/share/kernel/preinst.d
However, the Debian run-parts implementation (from debianutils) only accepts a single DIRECTORY argument. Passing two directories causes the error:
run-parts: missing operand
This prevents the kernel image from being installed entirely, as the preinst script fails before unpacking begins.
The fix is straightforward: split each run-parts call with two directories into two separate sequential calls, one per directory, each guarded by a directory existence check.
This bug affects installation via both the 'mainline' GUI tool and direct dpkg installation. The workaround is to manually patch the maintainer scripts and rebuild the .deb.
System: Linux Mint (Ubuntu-based), amd64
Affected versions: at least 6.19.11 and 7.0.0
Best regards,
Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260413/d7c920b2/attachment.html>
More information about the kernel-team
mailing list