summaryrefslogtreecommitdiff
path: root/tests/test_resolver_hints.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-04-20Allow "conflict" to be specified as a safety level again, with its old ↵Daniel Burrows1-0/+12
behavior, and fix setting safety levels using the old names. aptitude's behavior should now be fully compatible with pre-0.6.2 releases (by default). The safety level change fixes the fact that you could raise safety levels using the old names but not lower them.
2010-04-09Restructure the source tree to move tier_ related code into files whose name ↵Daniel Burrows1-2/+2
is based on "cost" instead.
2010-03-15Introduce new hint types to tweak cost components.Daniel Burrows1-16/+31
This also starts to introduce the concept of a "cost component": an intermediate counter of some sort that can be used to assemble a cost. The eventual goal is to haved named components, like "removals" and "upgrade-cancels", and operators that combine them to form new cost components, like "removals + upgrade-cancels". "cost component" / "cost" is the terminology I eventually want to move towards, in favor of the confusing and badly-chosen "tier level" and "tier". This commit starts to introduce that terminology, and all my new commits will use it (except where local consistency demands otherwise). Eventually I need to make a pass over the code and rename lots of stuff.
2010-03-05Overhaul the resolver to distinguish between tiers and changes to tiers; ↵Daniel Burrows1-14/+11
this is the first step towards being able to minimize the number of changes meeting a criterion. The biggest change for this is that the new cost objects (tier operations) are not totally ordered, so various places that used to take a maximum now take a least-upper-bound instead; similarly for minimum and greatest-lower-bound. Still to do: find a sound way to allow the resolver to add together costs instead of upper-bounding them: "this change will force us to remove 10 packages". The new code seems to be a little too slow -- probably it lost some optimizations by accident. It does seem to be correct, though.
2010-02-07Initial implementation of a tiering system that is both sound and flexible.Daniel Burrows1-2/+3
The rule in this system is that you can increase tier levels either by adding positive numbers to them or by lower-bounding them. Any given slot in the tier has to be managed using only one of these operations, but different slots can be managed using different operations. This allows support for the new "add to tier" operation, while maintaining the ability to do the old "increase to level" operation (both for backwards-compatibility and for supporting pin priorities). Currently the unit tests fail; this needs to be fixed.
2010-01-27Update the unit tests for the new tier object.Daniel Burrows1-4/+14
2009-03-29Write support for resolver hints that adjust version tiers.Daniel Burrows1-1/+13
The syntax is "increase-tier-to TIER PACKAGE [VERSION]". The tier is either an integer, "conflict", or "minimum" (although "minimum" has no effect, so there's no point in using it).
2009-02-01Push the resolver_hint -> hint rename into the test code too.Daniel Burrows1-2/+2
2009-01-18Use the exact name matcher to fix the "hints match too much" bug.Daniel Burrows1-8/+8
2009-01-17For consistency with the documentation, use "approve" instead of "accept" to ↵Daniel Burrows1-5/+5
mandate versions.
2009-01-16Also test operator=.Daniel Burrows1-0/+6
2009-01-16Add a sanity-check that the copy constructor does something sensible on hints.Daniel Burrows1-0/+11
2009-01-16Add some basic tests of resolver hints.Daniel Burrows1-0/+211