24 Commits

Author SHA1 Message Date
Niels Thykier
204359e3bc inst-tester: Fix typo in a variable name
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-03 18:29:09 +00:00
Niels Thykier
463d1a67d9 Prefer pkg_id.foo to pkg_id[X]
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-05-28 09:37:28 +00:00
Niels Thykier
eb24cbcd67 Remove unused named parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-04-11 16:27:27 +00:00
Niels Thykier
8d94bbc212 inst-tester: Use short-hand syntax for new sets
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-04-11 16:27:26 +00:00
Niels Thykier
5a90b13756 inst-tester: Add a missing param to doc strings
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-04-11 16:27:26 +00:00
Niels Thykier
dceca2c666 inst-tester: Move loop into resolve_choices
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-04-11 16:27:26 +00:00
Niels Thykier
97663ebaab inst-tester: split _pick_choice into two
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-04-11 16:27:26 +00:00
Niels Thykier
249a19bfef Defer a frozenset call
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-01-17 20:39:05 +00:00
Niels Thykier
da5e797fc9 Remove unused variables/assignments
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-01-17 20:37:45 +00:00
Niels Thykier
a9ee64470e Always use pkg ids in the InstallabilityTester API
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 20:33:06 +02:00
Niels Thykier
3d5d328738 Use inst_tester to compute smooth updatable binaries
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-13 19:33:22 +02:00
Niels Thykier
289807463e Rewrite computation and testing of "affected" packages
Rely on the Installability tester to locate all of the affected
packages plus their transitive reverse dependencies.  As the
InstallabilityTester is suite agnostic, the set of affected packages
now includes (versions of) packages not in testing, which is filtered
out during the check.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-09 21:06:06 +02:00
Niels Thykier
8eb1abede3 InstTester: Clarify some documentation
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-09-09 17:38:33 +02:00
Niels Thykier
6047875953 inst-tester: Fix bug "choices" would not be updated
In some scenarios, it was possible to trigger a bug in the
installability tester, where it would fail to update the "choices" set.
The requirements for triggering this seems to be something like:

 * Obtain a choice that is possible to solve.
 * Resolve the choice without recursing (with a backtrack point)
 * Obtain a second choice that is impossible to solve.

After the two first steps, the installability tester would fail to
update the "choices" set (or, rather, changes would be invisible to
the "_pick_choice" function).  Fortunately, most packages are either
trivially installable or trivially uninstallable, so the bug seems to
be rather rare if triggred at all.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
b4e4ba4681 Collect more statistics from the installability tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
2a34970304 Compute simple stats installability tester graph
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Julien Cristau
6c344589ee Remove dependency on six
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
18f7101847 Use six.moves for itertools, urllib and intern
They're renamed in python3.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Niels Thykier
12691baa87 Exploit equivalency to skip unneeded computation
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:33 +02:00
Niels Thykier
2576366dd0 inst-tester: Attempt to avoid needing to backtrack
When trying to break a choice, try the candidate out and see if we can
pick it without any consequences.  Basically, if the candidate causes
no new conflicts or choices, we can safely pick it.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:16 +02:00
Niels Thykier
4babb75f8f inst-tester: Exploit eqv. table in compute_testing_installability
Use the equvilence table to skip some calls to _check_inst.

Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:16 +02:00
Niels Thykier
72daebd67c installability: Exploit equvialency to reduce choices
For some cases, like aspell-dictionary, a number of packages can
satisfy the dependency (e.g. all aspell-*).  In the particular
example, most (all?) of the aspell-* look so similar to the extent
that reverse dependencies cannot tell two aspell-* packages apart (IRT
to installability and co-installability).

This patch attempts to help the installability tester by detecting
such cases and reducing the number of candidates for a given choice.

Reported-In: <20140716134823.GA11795@x230-buxy.home.ouaza.com>
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-08-04 20:20:03 +02:00
Adam D. Barratt
4f48872102 Fix a crash during installability testing
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2014-02-27 18:12:54 +00:00
Niels Thykier
7051d5b0e9 Rewrite installability tester
The new Installability Tester (IT) module replaces the remaining
C-parts.  Unlike C-implementation, it does not give up and emit an
"AIEEE" half-way through.

In order to determine installability, it uses two sets "musts" and
"never".  As the names suggest, the sets represents the packages that
must be (co-)installable with the package being tested and those that
can never be co-installable.  For a package to be installable, "musts"
and "never" have remain disjoint.

These sets are also used to reduce the number of alternatives that are
available to satisfy a given dependency.  When these sets are unable
to remove the choice completely, the new IT defers the choice to later.
This occasionally reduces backtracking as a later package may conflict
or unconditionally depend on one of the remaining alternatives.

Signed-off-by: Niels Thykier <niels@thykier.net>
2013-11-27 19:46:59 +01:00