--- Begin Message ---
Package: linux
Severity: normal
Dear maintainer,
In Debian, linux-headers-generic is a virtual package.
https://packages.debian.org/bullseye/linux-headers-generic
In Ubuntu, linux-headers-generic is a real package.
https://packages.ubuntu.com/linux-headers-generic
It depends at time of writing on linux-headers-5.19.0-21-generic which
then somehow pulls the architecture specific kernel headers package.
What's the advantage of having a linux-headers-generic package?
Instructions to install packages often look like this:
sudo apt install some-package-that-builds-a-kernel-module
linux-headers-$(dpkg --print-architecture)
The part "$(dpkg --print-architecture)" is hard to type, remember for
many users. Bash tab competition is unsupported.
By comparison, the following looks nicer.
sudo apt install some-package-that-builds-a-kernel-module
linux-headers-generic
But once linux-headers-generic exists, this could could be simplified
even further. some-package-that-builds-a-kernel-module then could have a
'Depends: linux-headers-generic'. Then it could be as simple as:
sudo apt install some-package-that-builds-a-kernel-module
The internet is full with people asking questions because package
installation failed due to missing kernel headers packages.
Could this please be improved?
Cheers,
Patrick
--- End Message ---
--- Begin Message ---
On Wed, Sep 24, 2025 at 02:30:58AM +0300, Roman Lebedev wrote:
> > Please explain what you are trying to do. There is no real way to
> > depend on Linux headers and expect it to get something working.
> In case of things such as dkms modules, it's the version of kernel headers,
> and that is precisely what i was hoping to codify,
> only to discover that i then must manually enumerate
> each per-arch headers package.
This is not possible.
Those are only meta-packages. It just depends on the real packages and
users will have multiple versions installed of those at the same time.
So even a dependency on >= 6.12 does not mean a 6.1 can not show up.
There are other variants of the kernel or no generic one at all. So you
install headers of kernel the user does not want or just fail
completely.
So just don't do that. I'm also closing this here.
Bastian
--
Landru! Guide us!
-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4
--- End Message ---