Re: obscure <constraints> question

Will Partain <[email protected]> Tue, 19 Feb 2002 20:45:20 +0000
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Jonathan writes:

> On 18/2/2002 20:51, Will Partain wrote:
> 
> > Why is this an error?  Imagine you had a package for 'foo-wrapper'
> > which let you choose between 5 versions
> 
> In that case I'd say that the more specific constraint
> still satisfies the more general one, but where there's
> multiple more specific constraints, you go with the higher
> version number.

Thx for the ongoing ideas; but you're not helping me sleep
better at night :-) Comparing version numbers ("quick!
what's newer? 1.2.3 or 20020220?" [a nightly snapshot,
perhaps]) is impossible in general, and I'd rather avoid
per-object cmp methods...

> So a dependency on 'foo' is satisfied by 'foo--1.2.3'
> (presumably, that would appear in the queriable
> information for that dependency). However, in the case
> that some other field requires 'foo--1.2.3' and
> 'foo--1.2.4', then the field is satisfied by 'foo--1.2.4'.

In my very-operational reading ("you always check through
prev-satisfied constraints to see if they satisfy the one at
hand"), I would get the same (foo--1.2.3) in the first case;
and would pick arbitrarily between foo--1.2.3 and foo--1.2.4
in the second case.  I think this would be fine in real life
(TM).

Remember, I am trying to solve the use-case of:

* for a particular use, site team says "I have/need apache 2.0.32"

* BoK (body-of-knowledge) team (e.g. Sidai) says, for the
  same use, "You need apache 2.x", I don't care which.

Meanwhile, the site actually has six versions of apache
deployed (for various reasons).  I want to know that the
constraint in the BoK won't get one of those irrelevant-here
versions.

> Interesting question is, if we have the following two dependencies:
> 
>     foo = 1.2.3
>     foo > 1.2.4
> 
> and we have a 'foo--1.2.5', then does this require both 'foo--1.2.3' and
> 'foo--1.2.5'? I would say yes.

Yes.  That's what it does now.

> Question is: how hard is it to solve these constraints?

The phrase "solve constraints" keeps me awake at night :-)
I don't want to go there.

Will