Re: How do I specify a custom apt dependency between kernel image and its headers?
On Tue, Mar 28, 2023 at 12:19:05PM +0300, Anssi Saari wrote: > Ram Ramesh writes: > > > How do I tie the install of linux-image to linux-header so that I cannot > > install image without the headers. > > In my experience it's been enough to install linux-image-amd64 and > linux-headers-amd64. When I run apt upgrade both are updated if new > versions are available. Backports doesn't always track that relationship very consistently. It can be frustrating. Cheers, Tom -- "When the going gets weird, the weird turn pro..." -- Hunter S. Thompson signature.asc Description: PGP signature
Re: How do I specify a custom apt dependency between kernel image and its headers?
Ram Ramesh writes: > I have nvdia card that requires binary driver to work in my system. Xorg is > unable display anything with free driver. Since nvidia-driver has to be > built for each kernel install, I need to install headers also. This seem to > work automatically for any standard kernel release in bullseye. However > when I install newer kernel from backport, apt does not install headers > automatically. How do I tie the install of linux-image to linux-header so that > I cannot install image without the headers. In my experience it's been enough to install linux-image-amd64 and linux-headers-amd64. When I run apt upgrade both are updated if new versions are available.
Re: How do I specify a custom apt dependency between kernel image and its headers?
If I understand you correctly, you want to set it up so that for every package pair linux-image- linux-headers- attempting to install the former results in also installing the latter? And you want this to apply not just for a specific version number, but for every version number, including ones that haven't come out yet? Yes this is what I want. Just off the top of my head, I don't think there's any way to accomplish that. The only possible avenue I can think of for adding an effective I was hoping I can add some rule based on regex in /etc/apt/preferences.d that will accomplish this. Well, if there isn't one then there is nothing much I can do. Since the system is accessible by ssh even if screen goes blank by a imperfect install of just linux-image, I can always ssh and then install headers and reinstall image to get nvidia-driver rebuilt and reboot. So, it is not that I am completely broken without this rule, but I wish it is something that can force/automate. Thanks for taking the time to respond with detail. Before I go, I have one question. When I try to install linux-image, apt tries to trigger a nvidia-driver build, but fails because headers are not present. However, it still completes the image install and changes grub menu etc. I prefer it stopped and complained. Is there a way to tell it to error out on this step, so that I will be prompted to look at this more closely? Typically, this message flies by on the screen and I was lucky that I saw it the last time. Regards Ramesh
Re: How do I specify a custom apt dependency between kernel image and its headers?
On 2023-03-27 at 20:03, Ram Ramesh wrote: > I have nvdia card that requires binary driver to work in my system. > Xorg is unable display anything with free driver. Since nvidia-driver > has to be built for each kernel install, I need to install headers > also. This seem to work automatically for any standard kernel release > in bullseye. However when I install newer kernel from backport, apt > does not install headers automatically. How do I tie the install of > linux-image to linux-header so that I cannot install image without > the headers. If I understand you correctly, you want to set it up so that for every package pair linux-image- linux-headers- attempting to install the former results in also installing the latter? And you want this to apply not just for a specific version number, but for every version number, including ones that haven't come out yet? Just off the top of my head, I don't think there's any way to accomplish that. The only possible avenue I can think of for adding an effective dependency to a package - without modifying its source and rebuilding it - is by making a custom metapackage (with custom dependencies) via equivs, and I don't think there's a way to do that with enough dynamic adjustment for this scenario. I think you'll probably need to just deal with specifying the install of the headers package explicitly when you install the image package. Unless the image package is coming in automatically, by dependency from e.g. the generic linux-image or linux-image- package, when you upgrade that package? In that case you might consider also installing the generic linux-headers (or linux-headers-) package, and upgrading both of them at once, so that when there's a new image package there will also be a new headers package at the same time. That's a workaround, though, and doesn't actually do quite exactly what you asked for. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw signature.asc Description: OpenPGP digital signature
How do I specify a custom apt dependency between kernel image and its headers?
I have nvdia card that requires binary driver to work in my system. Xorg is unable display anything with free driver. Since nvidia-driver has to be built for each kernel install, I need to install headers also. This seem to work automatically for any standard kernel release in bullseye. However when I install newer kernel from backport, apt does not install headers automatically. How do I tie the install of linux-image to linux-header so that I cannot install image without the headers. Regards Ramesh