#1034035 linux-image-6.1.0-7-amd64: linux image installation fails dkms step if headers are absent

Package:
linux-image-6.1.0-7-amd64
Source:
linux-image-6.1.0-7-amd64
Description:
Linux 6.1 for 64-bit PCs (signed)
Submitter:
Russ Hamilton
Date:
2023-04-07 21:30:03 UTC
Severity:
normal
#1034035#5
Date:
2023-04-06 22:36:25 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
I was trying to install the linux-image-6.1.0-7-amd64 package on my bullseye
system (needed newer drivers).
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
I enabled the debian unstable list in my apt sources, but pinned a preference
for bullseye packages.
Then I ran `sudo apt-get install linux-image-6.1.0-7-amd64`
   * What was the outcome of this action?
The installation appeared to have succeeded (apt returned succeess), but on
further examination kernel modules for necessary drivers were missing. A close
inspection of the installation log revealed the lines:
```
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-7-amd64:Error! Your
kernel headers for kernel 6.1.0-7-amd64 cannot be found.
Please install the linux-headers-6.1.0-7-amd64 package,
or use the --kernelsourcedir option to tell DKMS where it's located
.
```
   * What outcome did you expect instead?
I expected either the linux 6.1.0 kernel image to be installed and any dynamic
kernel modules built or for the installation to fail due to impossible
dependencies.


Comments:
1. If the kernel installation requires the headers to function properly, then
they should probably be a package dependency.
2. If dkms fails then we should probably consider the linux image installation
as having failed and revert to a consistent state instead of continuing.

#1034035#10
Date:
2023-04-07 21:12:19 UTC
From:
To:
https://wiki.debian.org/DontBreakDebian

The kernel installation did succeed.
Recommends: fakeroot, sudo, linux-headers-686-pae | linux-headers-amd64 |
linux-headers-generic | linux-headers

No. The kernel installation was successful.
If you choose to use dkms, then you need to ensure that that succeeds as well.
So this is either a DKMS (in general) problem or of the specific dkms package
that you chose to use.

As said above, the kernel does need the headers installed.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029063#36

Not a kernel bug, thus closing.

#1034035#15
Date:
2023-04-07 21:26:36 UTC
From:
To: