18 Commits

Author SHA1 Message Date
Niels Thykier
7124313aa6
Make InstallabilityTester suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 11:00:02 +00:00
Niels Thykier
ced7b7b413
Refactor britney.py to use InstallabilityTester less
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 11:00:01 +00:00
Niels Thykier
0eb8b5a201
BinaryPackageUniverse: Provde equivalent_packages
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:17 +00:00
Niels Thykier
ef813bf0d8
Let the BinaryPackageUnvierse track broken packages
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:16 +00:00
Niels Thykier
8867ef0cf9
Let the BinaryPackageUniverse track essential packages
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:15 +00:00
Niels Thykier
c0ecdd82fb
Remove now redundant APIs from the InstallabilityTester
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:13 +00:00
Niels Thykier
d557610c6f
BinaryPackageUniverse: Implement packages_equivalent_to()
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:10 +00:00
Niels Thykier
530db5d3f7
Extract a BinaryPackageUniverse from the InstallabilityTester
The InstallabilityTester is suffering from a lack of clear purpose
because it serves multiple.  This commit extracts most of one of these
purposes into the BinaryPackageUniverse class while retaining the
original API of the InstallabilityTester.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:09 +00:00
Niels Thykier
f86cda97da
inst_tester: Improve doc string/argument name
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-01 21:30:23 +00:00
Niels Thykier
dd5211d55a
inst-tester: Add missing element to a set
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:19:36 +00:00
Niels Thykier
55dd190fa6
inst-tester: Make "check" a list
Should be slightly cheaper (O(1)) than using a set.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:19:35 +00:00
Niels Thykier
cd1f384012
inst-tester: Remove obsolete "safe-set" optimization
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:19:34 +00:00
Niels Thykier
95b945d2b3
inst-tester: Remove obsolete optimization
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-30 12:19:34 +00:00
Paul Gevers
713b98ad6b
inst_tester: add is_pkg_in_testing 2018-09-05 21:27:41 +02:00
Niels Thykier
41978869ce Migrate solver's ad-hoc debug logging
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-31 07:04:35 +00:00
Niels Thykier
42be17ad26 inst-tester: Correctly handle unresolved essential choices
Britney has a special case for essential packages to ensure that any
package that with essential packages are not installable.  This check
did not account for a case, where a package is not co-installable with
two or more pseudo-essential package part of the same OR dependency.
A contrived example based on real world data:

  Package: foo
  # Conflict with all providers of "awk"
  Conflicts: mawk | gawk | original-awk

This alone is actually not sufficient to trigger the bug, as
_get_min_pseudo_ess_set is in theory some times smart enough to pick
an "obvious" solution between the pseudo-essential option.
  When it does, one of the above ends up in the (de-facto) essential set
and then the installability tester correctly rejects "foo".

Though, even with the fix above, the handling for this is probably not
correct if the essential set is not (fully co-)installable.  However,
that basically only happens if we are bootstrapping an architecture
(or testing is royally broken, in which case this is the least of our
worries).

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-11 11:08:52 +00:00
Niels Thykier
20c2b87833 Sprinkle some "no cover" pragmas over the code base
Add some "no cover" to some unrecoverable exceptions
(e.g. misconfiguration) or base-class methods that are not intended to
be invoked.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:39:46 +00:00
Niels Thykier
9bc94db01c Refactor all modules into a britney2 subdir
That way they are all contained.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 08:02:00 +00:00