Re: how to compare versions
"Wesley J. Landaker" <email@example.com> writes:
> On Friday 05 February 2010 04:43:05 Hideki Yamane wrote:
>> > This is true in general, although it's perhaps worth noting that a rare
>> > pre- depends on a priority required package like debconf by a priority
>> > optional or extra package isn't likely to cause any trouble.
>> Yes, it is true in general but I want to know the example for that :)
>> For example, if I have foobar package and it says "Pre-Depends:
>> debconf", what would happen?
> Short answer: nothing, it would work fine in practice.
> Long answer:
> Debconf would be required to be fully unpacked and configured before foobar
> could even be unpacked. But, since debconf is priority "required", and is
> already depended on by so many other packages that it's infeasible that it
> won't already be completely installed, the pre-depends would be a no-op. In
> the rare case that debconf wasn't already installed, it would simply be
> unpacked and configured first, which might slow down the resolver (and hence
> installation) but otherwise would be no problem.
> However, it is possible that you can dream up a bizarre corner case where
> you are pre-depending on a specific version, your doing a big dist-upgrade,
> the foobar package has a pre-depends and so do a bunch of other packages
> that are intertwined in foobar's dependency graph, and the whole thing
> explodes in a big unresolvable mess.
> The last paragraph is incredibly unlikely for just foobar pre-depending on
> debconf that's you'd have to come up with some silly scenerio to show it
> breaking, but if pre-depends were used all over the place on lots of
> packages, that kind of scenerio could happen really quickly, which is why
> they are generally to be avoided.
The graph doesn't even have to be that big. It just has to have a
depends/pre-depends/conflicts circle like:
debconf Conflicts: whiptail (<< 0.51.4-11)
whiptail Depends: libc6 (>= 2.2.5)
libc6 Conflicts: foo (<< 1.2-3)
foo Pre-Depends: debconf (>= 1.5.28)
If you have foo 1.2-3 installed with an old libc6 (< 2.2.5) things blow
up and foo has to be removed temporary.
But since now that we have Breaks it is far less likely to have such a
Conflicts from a lib to one of its reverse dependencies. With Breaks foo
would only be deconfigured, then debconf can be upgraded and configured
and last foo is upgraded and configured.
> I think the general idea is:
> 1) Don't use pre-depends.
> 2) No, really, don't use pre-depends.
> 2) Don't use pre-depends unless it's the best technical solution.
What he says.