0

I'm editing a control file of a deb package which contains

Depends: nvidia-340 (>=340.29), nvidia-340-uvm (>=340.29), nvidia-340-dev (>=340.29),
nvidia-modprobe (>=340.29), nvidia-settings (>=340.29), libcuda1-340 (>=340.29), 
nvidia-libopencl1-340 (>=340.29), nvidia-opencl-icd-340 (>=340.29)

I would like to change the dependency to nvidia-(...)-343-(...) for all entries and enforce the choice between all packages being nvidia-(...)-340-(...) or all packages being nvidia-(...)-343-(...).

After the lecture of the debian manual of package relationships I only know that I could specify nvidia-340 (>= 340.29)|nvidia-343 (>=343.0), nvidia-340-uvm (>=340.29)|nvidia-343-uvm (>=343.0), ... which would allow installation of nvidia-340 together with nvidia-343-uvm which is not what I want.

How do I enforce the installation of all packages of one version group only? I'm looking for a generic solution unrelated to the concrete package (NVIDIA cuda toolkit from http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64). The installation should work with apt-get after all.

1
  • I am not sure how you define variables, but it is possible to use them in the control file.
    – muru
    Jan 9, 2015 at 19:39

1 Answer 1

2

You can achieve what you aim for, by creating two meta packages (that only contain dependencies) that provide a virtual package (that exists to declare some functionality that some other package can provide). So:

Package: nvidia-dependencies-340
Provides: nvidia-dependencies
Depends: nvidia-340 (>=340.29), nvidia-340-uvm (>=340.29), nvidia-340-dev (>=340.29), etc...

Package: nvidia-dependencies-343
Provides: nvidia-dependencies
Depends: nvidia-343 (>=343.0), nvidia-343-uvm (>=343.0), nvidia-343-dev (>=343.0), etc...

Package: my-application
Depends: nvidia-dependencies

You must log in to answer this question.

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