开发者

how to define the "depends" for the running kernel

package A depends on package B-kmod and B-kmod has several variants. like B-kmod--{generic,pae-generic} etc. and 开发者_Go百科in turn B-kmod depends on linux-image of the same flavor.

i'd like A to have depends on B-kmod-$(uname -r). how to express this in control file?


If you mean that you want A to depend on a kernel module being installed matching the kernel version of the kernel running at the time that A is installed, that is definitely impossible. Your best bet as an alternative is to check for the availability of the features you require during the preinst or postinst scripts and fail the install if they are not present. You must keep in mind that:

  • They might have the functionality provided by B-kmod even if a package by that name isn't installed
    • they might have installed it without using a package
    • they might be running inside a chroot where they cannot see the packages for the running kernel
  • They might reboot into another kernel after installing A. So A should gracefully degrade in that situation.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜