views:

9

answers:

1

package A depends on package B-kmod and B-kmod has several variants. like B-kmod--{generic,pae-generic} etc. and 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?

+1  A: 

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.
stew
B-kmod is also provided by us. fail gracefully should be the choice. thanx.
Dyno Fu