[haiku-development] Re: What for does SAT solver needed for package management?

  • From: "X512" <danger_mail@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 18 Jun 2012 13:16:17 +0400

On Mon, 18 Jun 2012 10:27:59 +0200, Oliver Tappe <zooey@xxxxxxxxxxxxxxx> 
wrote:
> In your example above, you seem to assume that packages declare 
> dependencies 
> on exact versions of other packages (package A requires package B in 
> version 
> 1.6). What should happen if package B v1.6.1 is the only one 
> available? It 
> doesn't match v1.6, but it may (or may not) be compatible ...
This information can be known by package B. For example package B v3.5 
have information that version range 1.0 - 3.5 is compatible with it. 
When resolver will try to find package, compatible with B v1.6, package 
B v3.5 will be found becouse 1.6 contains in range 1.0 - 3.5. Also 
version range can be applied not only for a package but for individual 
items in a package.

In this case package developer don't need to find what services of 
imported package he need, he just set imported package version that he 
use, compatability is a problem of dependency packages.

> In order to allow for that (and to increase the flexibility), Haiku's 
> packages don't declare dependencies on exact versions of other 
> packages 
> (package A requires package B in version 1.6), but on abstract 
> resolvables 
> (package A requires something providing B in a version compatible 
> with ABI 
> 1.6).
In what way abstract resolvables will be defined?

> unless it failed because of a timeout, which just indicates that 
> the problem is too complicated
Can SAT-solver guarantee that if developer package his software 
correctly this will never happens?


Also it is good to mention, that linux packages is maintained by army 
of linux distribution maintainers. Without maintaining package can stop 
working for some unknown reason(someone break binary compatability, new 
GCC appeared and many others). While this is OK while all packages can 
be tested manually, this is absolutely unacceptable for commertical and 
independent packages(Haiku will has that, won't it?). Developers of 
such packages don't know about each other and test only their software, 
not all avalible. They don't know what future versions of dependency 
packages will arrive. User must have ability to use such packages in 
any combinations, even if packages is 10 years old. Also he need to 
know what he need to install to use a package.

Other related posts: