0

I want to depend my deb package to current kernel version that is installed on machine.

for example if my kernel version is 3.13.0-77 my deb file depends on linux-headers-3.13.0.77-generic

if I add "linux-headers-$(uname -r)" to Depends field in debian/control file, dpkg-buildpackage returns an error in dpkg-gencontrol process.

how can I add this feature in my packaging?

2 Answers 2

0

Use:

Depends: linux-headers-3.13.0.77-generic (>= 3.13.00.77), linux-headers-3.13.0.77-generic (<< 3.13.00.78)

$(uname -r) in this case does'nt cut it.

1
  • thanks, but in this way when my kernel changed I must repackaging!
    – Mansour
    May 4, 2016 at 5:05
0

I suggest that your dependency be linux-headers-generic since, if it is installed, the headers for the currently running kernel, no matter what it is, are also installed.

1
  • thanks, but my repository has various version of Linux-headers, and this solution not good for me
    – Mansour
    May 4, 2016 at 5:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .