[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian package non-strict equal dependencies



Dmitrii Kashin <d.kashin@solarsecurity.ru> writes:

> There's an interesting type of dependencies in RPM: "non-strict equals".
>
> The main thing is we can describe dependency as `pkg (= "2.0")' and yum will
> install package `pkg' of version "2.0" with the maximum revision
> found. And also we can write dependency specifically with revision,
> f.e. `pkg (= "2.0-43")' and yum will install specifically "2.0-43".
>
> But it seems that debian packages don't have such non-strict
> mechanism. As far as I got it the = operator is only for "strict equal",
> and there's no way to say "install the maximum revision of the specific
> version".
>
> Well, now I'm trying to repack one project (my job) from centos to
> debian. And I wonder what would be the most correct way for such kind of
> dependencies.
>
> 1) I could not write dependency operator at all.
> 2) I could write >= and version (f.e. "2.0")
>
> The only thing I doubt is that I've already met in centos such a
> problem:
>
> If there's package A which depends on B and C, B depends on D (=
> "2.0-43") and C depends on D (>= "2.0"). If there're packages D-2.0-43
> and D-3.0 in the repository, then yum fails to resolve dependencies.
>
> I wonder what the apt's behavior is in such situation?
>

If you _know_ that D-3.0 and later are incompatible with C, then you
should do the dependency as: D (>= 2.0), D (<< 3.0~)

(the ~ is there to catch things like our backport versions, that look
like 3.0~bpo8-1, and sort _just_ before 3.0)

If the reason you want it to be 2.0 versions is that you simply suspect
that there _might_ be an incompatiblity with later version once it comes
out, then all you really know is that it needs 2.0 or later, so then
you'd just declare it as: D (>= 2.0)

In the scenario you describe above, I'd expect apt to do the right
thing, and install the D-2.0-43 version.

BTW from what you say about Yum, it sounds like all RPMs have a dash (-)
in their version, whereas dpkg versions do not need to have a dash. This
may change some of your assumptions.

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY

Attachment: signature.asc
Description: PGP signature


Reply to: