3

For debian packages, Is that possible to have Depends name generated during install time based on some condition? For example,

For package PACKAGE-1, based on the kernel version it can depend on PACKAGE-A or PACKAGE-B... I cant hardcode depends package name during build time because its decided based on the system (kernel version) on its getting installed...such as Depends: PACKAGE-A [uname -r >= '3.13.0-40'], PACKAGE-B [uname -r < '3.13.0-40']

FYI Seems such dependencies can be created based on arch but couldn't any get if it can be customized further... Depends: foo [i386], bar [amd64]

Prasath
  • 595
  • 5
  • 11

1 Answers1

1

You are correct- what you are asking for is not possible with current dpkg/apt.

Unless this is for a kernel module, the right thing to do is probably to ship the binaries for both PACKAGE-A and PACKAGE-B in the same deb, and include a script that chooses between them at runtime.

the paul
  • 8,972
  • 1
  • 36
  • 53