1142 Commits

Author SHA1 Message Date
Niels Thykier
f9c643537c britney: add ignore-rc-bugs hint to HINTS_HELPERS
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-03 16:47:24 +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
3c33818499 tests: add test case for parsing aliased hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:56:50 +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
Niels Thykier
1fcccea83f tests: Extract some common test utils to tests/__init__.py
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:14:49 +00:00
Niels Thykier
61bdee0fa7 Upload code coverage results to codecov.io
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 11:06:43 +00:00
Julien Cristau
608ce0e9d2 Fix logging of conflicting hints
Not all hints have a 'days' attribute.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2017-01-29 11:14:55 +01:00
Iain Lane
ccfd61cf6a hint-tester: Don't lowercase the input
Doing this means that you can't use the hint tester for packages with
uppercase characters in the version, e.g.

  Version mismatch, dreamchess 0.2.1-rc2-2build1 != 0.2.1-RC2-2build1

Closes: Debian#846141
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 08:38:39 +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
cd5e253b9c Revert "Give myself block-all hint"
This reverts commit e296dd843ead67e73d04d0bf2af75b0c9935423a.
2017-01-07 09:04:40 +00:00
Niels Thykier
e296dd843e Give myself block-all hint
... until we get write access to the freeze hints

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-06 07:30:55 +00:00
Emilio Pozuelo Monfort
af7c96142d Add ignore-piuparts to the standard hint set
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
2016-12-09 08:59:56 +01:00
Niels Thykier
0349cd9477 Implement a mandatory 10 day migration delay
Per https://lists.debian.org/debian-devel-announce/2016/11/msg00002.html

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-12-07 21:39:45 +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
Robert Bruce Park
40ccb4bdc6 Invalidate excuse after each policy run
This fixes commit 497edc to really allow policies to see if the excuse has
already been invalidated by previous policies.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-26 19:34:54 +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
20f2e27873 Fix --print-nuninst + --nuninst-cache
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:21:06 +00:00
Niels Thykier
fd614062ae Minor optimisation of force handling
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:20:45 +00:00
Niels Thykier
56fa65f596 Replace a use of src[X] with src.x
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 21:08:37 +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
0f45b195a6 Refactor doop_source to simplify logic
Cleanly split doop_source into a (small) part about source packages
and a (longer) part about binary packages.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:13 +00:00
Niels Thykier
027142e12b Fix bug where compute_groups returned tuple instead of pkg_id
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:13 +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
7af650d36d "selected" is never None in iter_packages
It used to be possible, but it is not any more.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
ecf95229d3 Use asserts to guard single binary removal items
Coverage suggests that the conditions are always true.  If so, we can
replace the "elif" with a regular "if" - but for now, lets keep an
assert.

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
d7f6a00a51 Add another policy test for ignore-rc-bugs
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:05 +00:00
Niels Thykier
96b7e606cf Add simple RC bugs unit test
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:01 +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
4eb5bdb396 Show coverage reports in travis-ci builds
Ideally we would extract that report and post it somewhere.  That is
left as future work.

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 12:49:45 +00:00
Niels Thykier
6360daf8c5 Assert that binaries have sensible arch values
Add a check to ensure we do not create broken test data (as happened
recently, where the architecture values were swapped for a single
binary).  A cold hard failure like this is easier to debug
compared to Britney playing "garbage in, garbage out".

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 12:49:39 +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
Martin Pitt
15fdf960d7 Use Excuse.is_valid when iterating through checks and Policies
This gives Policies the opportunity to see if a previous check
(build/installability) or earlier policies already invalidated the update. This
allows writing policies that work on groups of packages, or skipping expensive
checks (such as triggering autopkgtests while the package is not built or
installable yet).

Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:46 +00:00
Niels Thykier
e13763d335 Refactor out some some hash lookup in _compute_groups
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-13 11:18:45 +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
636f349def Correct description to say "Release" instead of "InRelease" 2016-11-13 11:18:45 +00:00