GSoC 15 - Dependency Calculation using SAT
Mihai Moldovan
ionic at macports.org
Sat Mar 21 14:18:44 PDT 2015
On 21.03.2015 02:00 PM, Jackson Isaac wrote:
>>> Do you mean like in Portfile we have:
>>
>> Did you mean PortIndex instead of Portfile?
>>
>
> Yes, I meant PortIndex. Sorry for the typo.
Ok, that makes more sense. Thanks.
> So we will have to calculate the dependency tree while we install.
> Since there can be many variants possible and each will have different
> dependencies.
Yes, quite so. That's what is currently being done.
> Using SAT method we will be defining minimal dependencies and these
> dependencies will be further checked for their dependencies or we need
> to still define all the dependencies for each package?
Keep in mind that variants can also *remove* dependencies (at the
moment.) In that case, the base line dependencies you just called
minimal could *shrink* by activating a variant.
> Eg. x depends on y. so in portfile of x say it depends on y. Now we
> will check if y depends on any a,b,c further. Like this compute
> different possible combinations and select the best course and also
> taking the variant into account (using Boolean).
As a side note: a (as far as I've seen) very good/understandable example
of how SAT is being used as a package dependency resolution is given in
this slide show:
https://files.opensuse.org/opensuse/en/b/b9/Fosdem2008-solver.pdf
Taken from here:
https://en.opensuse.org/openSUSE:Libzypp_satsolver
One benefit of using a SAT solver for dependency calculation is to
support cyclic dependencies. With the current implementation, this is
impossible.
Mihai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150321/b03ffa97/attachment.sig>
More information about the macports-dev
mailing list