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?

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.

  • thanks, but in this way when my kernel changed I must repackaging! – Mansour May 4 '16 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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.