This refactors DefaultPackage into types.Package and gets rid of the
interface. This is a preceeding for a follow up where accessors will be
removed from the code.
It also does several cleanup, so we get rid also of some unneeded
dependencies.
While install calls upgrade which in turns calls a relaxed install on
its results, this doesn't make sure that the new results are at the best
available version. We do iterate here over the results to compute the
best set.
It also expands computeUpgrade with the possibility to selectively
choose which packages to upgrade and which not.
It introduces a relaxed way to install packages with loose deps. Default
installation now will by default prefer up-to-date packages during
selection.
Also:
- Upgrade now it's used in install so it have to return the full system view also when there is nothing to upgrade
- Avoid checking upgrade upfront if relaxed is on
With BuildWorld() we get more results back (now we return the whole
model, including the false assertions).
Besides, now solving with BuildWorld() detects an invalid case:
when we supply a provided, the definitionDB shouldn't explictly supply
also the package that has to be provided. This would cause to 'shadow'
packages between repositories.
The test was invalid before, and shouldn't have contained A1. Moved the
test to Pending to inspect it further in subsequent dev iterations
With this change the solver during install now considers only the part
of the tree which is required to calculate the solution, it doesn't
consider anymore World() as the search space.
The search space now is narrowed down to the packages that related to
the one which we are considering.
In this subset of changes we are also optimizing the Parallel solver
avoiding an useless loop.
This change boost overall performance on large datasets which don't
necessarly have relations touching the whole tree.
- Adds upgrade --universe and upgrade --universe --clean. It will
attempt to bring the system as much close as the content available in
the repositories. It differs from a standard upgrade which checks
directly that what is pulled in doesn't conflict with the system. In
this new way, we just query the SAT solver to decide that on our
behalf.
- Add uninstall --full-clean. It uses only the SAT solver to uninstall
the package and it will drop as many packages as required (including
revdeps of packages too.
- Don't sign installed packages during finalizer execution
- Enforce solver constraints: build ALO and AMO rules taking into account
that the current package might not be selected at all.
- Force uninstalls on upgrade
- Enable option to tell uninstall to ignore conflict with the analized system state,
as we don't want any conflict with the installed to raise during the upgrade.
In this way we both force uninstalls and we avoid to check with conflicts
against the current system state which is pending to deletion.
This is due to the fact that now the solver enforces the constraints
and explictly denies two packages of the same version installed.
- Adapt test as now we generate more constraints, which makes the solver more
noisy on the package that are explictly selected or not
Add "provides" field in packages (which affect both runtime and buildtime deps).
It replaces all the occurences in the deptree before solving, actually
allowing to swap packages and provide virtuals. Along with a mechanism
for package rename #25.
This happens because we select the best instead of selecting the best match in Package BuildFormula()
- Extend the selection test
- Select from databases when ordering
- Relax assertions search
- Split compile step in test
- Adapt tests
Note: This is temporarly until we treat this case in BuildFormula() inside Package
we need to build the constraints between all the requires when expanding
and then create a new constraint that selects the best match
first step - it is slower in the implementation for now, but all cases
seems to be sorted out.
Drop Flagged() and IsSet() from solver. the solver wont care, and only
the assertion value does matter (exception for uninstall)
Uninstall can be done in different ways - the most accurate would be to try find a minimum subset of packages that gives conflicts and try to reduce them gradually.
E.g. this could be done with other SAT algorithms. For now we keep things simple and we compute the uninstalls as an indirect of an installation from an empty profile.
Also take care of corner cases where world has no clauses, and fixes a typo in building the world formula