441 Commits

Author SHA1 Message Date
Niels Thykier
69473eefca solver: Extract compute_scc into a function
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29 07:54:48 +00:00
Niels Thykier
bd375fdd85 solver: Make _compute_scc iterative
Rewrite _compute_scc to be iterative to avoid call recursion limit for
graphs with long dependency chains.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29 07:40:15 +00:00
Niels Thykier
64653087d0 solver: Fix bug where some items were not emitted
Sometimes the solver would correctly compute which items are grouped
together, but then fail to emit some groups.  This is trivially
fixable by forcing an update of "before" + "after" relations.
Admittedly, this looks unnecessary, so it may just be hiding the bug.

Nonetheless, the change makes the new test_solver_simple_scc test
produce the expected result.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-28 21:36:01 +00:00
Niels Thykier
189edf42ec britney: Move britney's start of day to 7 pm
In preparation for running Britney 4 times a day and we wanting the
22:00 UTC run to do the aging.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08 06:21:26 +00:00
Niels Thykier
f6120e5ec3 Use the correct required age in html excuses
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-03-19 18:01:35 +00:00
James McCoy
0c44d3ac27 excuse: Add an EOL to the verdict summary line in HTML output
devscripts' grep-excuses expects each <li> to be on its own line.  When
d7a676d0741729bb643e0b8c54b989cb747c6a4b added the verdict summary,
without an EOL, it broke grep-excuses' ability to search by maintainer.

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-25 06:54:14 +00:00
Niels Thykier
67c784f796 excuse: Use verdict name rather than object in excuses.yaml
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-14 07:36:54 +00:00
Niels Thykier
9ca5f7e24e Add more verdicts to provide more detailed excuses
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
d7a676d074 Aggregate all migration decisions and present it in excuses
With this change, Britney can now provide a very brief summary of the
migration via one single value (YAML) or line (HTML).  This solves two
issues:

 * It provides an aggregated version of the policy decision without
   having to loop over all policies (and even those would not give
   a full verdict on their own as not all rejections come from
   policies)

 * It enables a simple way to inform readers of the HTML excuses of
   whether a rejection is permanent or not.  This should hopefully
   make it easier for contributors to understand Britney and react
   more pro-actively.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
f40a7f41b3 Replace dontinvalidate with forced
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
b34ac3bdd9 Add a verdict field to all policies with the actual verdict
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
5f2a84a4f8 Remove redundant if-else - if branch is always true
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +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
ed2a34e897 hints.py: Fix incorrect documentation of min_args parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:58:14 +00:00
Niels Thykier
ee12b76885 tests: Add test for some invalid hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:56:50 +00:00
Jonathan Wiltshire
3156b2c753 Fix call to super() in SimplePolicyHint
Signed-off-by: Jonathan Wiltshire <jmw@debian.org>
2017-01-29 01:17:53 +00:00
Niels Thykier
3e888a9fdf PiupartsPolicy: Improve html message
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-12-04 10:38:15 +00:00
Niels Thykier
bcdb2b39cd Add PiupartsPolicy to avoid piuparts regressions
Closes: Debian/britney2#16
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-26 17:11:40 +00:00
Niels Thykier
e6e221ad52 Extract a compile_nuninst and move it to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:33:39 +00:00
Niels Thykier
eaf4660918 utils: Replace explicit loop index handling with enumerate
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:33:21 +00:00
Niels Thykier
06504f2ae7 Move invalidate_exuses to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:22:22 +00:00
Niels Thykier
166a6533ba completer: Replace src[X] with src.X
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
0cc7f7a8d2 Move build_installability_tester to builder.py
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
7a63784876 Move get_dependency_solvers to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
c4be8436db Move read_sources_file to utils
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:03:40 +00:00
Niels Thykier
a14ced6403 Drop now unused "from __future__" imports
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
9ca30aac81 Rename a variable for clarity reasons
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
a768432eb2 solver.py: Add missing "no cover" pragma
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
d3e343a3bd AgePolicy: Fix bug in creating the age file
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
241b17602d utils: Remove condition that is always true
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
fc2269ba02 rc-bugs policy: Ignored bugs are not unique to testing
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
9c563f1a96 Move data classes into britney2/__init__.py
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 17:33:45 +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
54fd517062 excuse.py: Drop now unused urgency field
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
2d8a471f70 undo_changes: Simplify case for virtual packages
doop_source never (no longer?) creates an element in "virtual" where
the package name is prefixed with "-", so we can drop that branch.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
1f1086b929 utils: Replace a case of b[FOO] with b.foo
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
2ce2d7efb3 utils: Remove reundant VERSION=VERSION parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
dd426c81fa Remove dead case in undo code
The doop_source method does not generate any /binary/ undo items,
where the package name starts with "-".  This fact allows us to remove
a branch in the undo code.  This also happens to be fortunate because
the call to "inst_tester.remove_testing_binary" in that branch happens
to be wrong.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +00:00
Niels Thykier
50d4d45c59 Collect suite metadata in a new member hash
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +00:00
Niels Thykier
c86e1f7e9c britney: Skip architectures not listed in Release files
As a side effect, remove mips64el from NEW_ARCHES as we no longer need
that as a work around.

Closes: Debian/britney2#12
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +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