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

Re: Versionned dependencies



Tanguy Ortolo <tanguy+debian@ortolo.eu> writes:

> Packages can currenctly declared dependencies on specific versions of
> other packages, with simple relations: <<, <=, =, >= and >>. For
> instance:
>     Package: xul-ext-adblock-plus
>     Depends: iceweasel (>= 3.6.13) | iceape (>= 2.1) | â?¦
>
> While this is sufficient for most cases, it does not cover one
> interesting case: a dependencies on a range of versions. For instance:
>     Package: xul-ext-adblock-plus
>     Depends: iceweasel (>= 3.6.13, << 12.0~a1+) | iceape (>= 2.1, << 2.9~a1+) | â?¦
>

That is just a
    Depends: iceweasel (>= 3.6.13) | iceape (>= 2.1),
             iceweasel (<< 12.0~a1+) | iceape (>= 2.1),
             iceweasel (>= 3.6.13) | iceape (<< 2.9~a1+),
             iceweasel (<< 12.0~a1+) | iceape (<< 2.9~a1+)

> Because this kind of conceptual dependency cannot be expressed¹, what is
> currently done is:
>     Package: xul-ext-adblock-plus
>     Depends: iceweasel (>= 3.6.13) | iceape (>= 2.1) | â?¦
>     Breaks: iceweasel (>= 12.0~a1+), iceweasel (<< 3.6.13),
>             iceape (>= 2.9~a1+), iceape (<< 2.1)
> which is not accurate and has unwanted since it declares conflicts whith
> other package versions that do not really conflict but only do not
> satisfy the real dependency.

That could be shortened to:

    Depends: iceweasel (>= 3.6.13) | iceape (>= 2.1)
    Breaks: iceweasel (>= 12.0~a1+), iceape (>= 2.9~a1+)


There is another solution: Dummy packages (build by xul-ext-adblock-plus)

Package: xul-ext-adblock-plus 
Depends: xul-ext-adblock-plus-iceweasel | xul-ext-adblock-plus-iceape

Package: xul-ext-adblock-plus-iceweasel
Depends: iceweasel (>= 3.6.13), iceweasel (<< 12.0~a1+)

Package: xul-ext-adblock-plus-iceape
Depends: iceape (>= 2.1), iceape (<< 2.9~a1+)

I'm not saying that is the way to do it but it is a possibility.

> In practice, this causes problems such as #653302: installing
> xul-ext-adblock-plus removes iceape just because the current packaged
> version of iceape cannot take advantage of adblock-plus.

Why does it remove it? Or rather in which situations? A simple "upgrade"
or "dist-upgrade" should keep back the package rather than remove
iceape. Obviously if you force the issue it will remove iceape but that
then is your own fault. I don't see how the situation would be different
with depends instead of breaks. In both cases it is impossible to
install a mismatching set of versions.

This might be a bug in the frontent rather than xul-ext-adblock-plus.

> I would like to hear your opinions on that subject. Independently of the
> Mozilla extension context, I think that double-versionned dependency
> make as much sense as simple versionned ones. Or, in other words, if a
> piece of software can depend on some other one's versions superior to X,
> or inferior to Y, it could very well depend on versions superior to X
> and inferior to Y, and I do not see a reason why we should not be able
> to represent that.
>
>
> Note:
> ¹ Technically, it could be expressed by expanding it according to de
>   Morgan's laws, but the result would be a huge and complicated
>   dependency list, which would probably give a hard time to dependency
>   solvers.

It grows exponentially but for 2 packages that is still ok.

MfG
        Goswin


Reply to: