Re: debian/control: enhanced version dependencies?
On Thu, 14 Jan 2016 09:35:31 +0100, Harald Dunkel wrote:
> Hi folks,
>
> For running a local set of meta packages I would like to express package
> dependencies depending upon other packages installed, e.g.
>
> Package: xyz
> Version: all
> Depends: ${misc:Depends}
> , dbus (systemd >= 215)
dbus | systemd < 215
>
> Hopefully you get the meaning. Package xyz could make sure that dbus is
> installed, if systemd is installed. (systemd version 215 itself just
> recommends dbus.)
>
>
> Another example:
>
> Package: mykde
> Version: all
> Depends: ${misc:Depends}
> . kde-full
> , mykde1 (kde-full >= 5:66)
kde-full < 5:66 | mykde1
> , mykde2 (kde-full >= 5:77)
kde-full < 5:77 | mykde2
> , mykde3 (kde-full >= 5:84)
kde-full < 5:84 | mykde3
>
> Package mykde1 :
> :
>
> Do you think this could be possible? Are there other options for
> debian/control to express complex package dependencies?
You are trying to create implications. a => b is the same as !a || b,
which is how I expressed the dependencies above. This is easy to do for
versioned dependencies, but not so easy for non-versioned ones (you
cannot have !package in the Depends field, there is the Conflicts field
but that is another grouping). You could work around that limitation by
imposing a (<< 0~) restriction to packages that should not be installed
in any version.
This may make the package difficult to install, however, because apt only
considers one version per package as candidate.
--
Saludos,
Felipe Sateler
Reply to: