686 Commits

Author SHA1 Message Date
Niels Thykier
f752ea4ac7 Merge branch 'master' into autopkgtest 2018-03-31 05:35:06 +00:00
Niels Thykier
32b2ee326a Use lazy evaluation of format arguments in logging
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-30 17:38:50 +00:00
Niels Thykier
b23777c852 britney: Replace all calls to "log" with logger
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-30 17:11:10 +00:00
Niels Thykier
ac69b3b5c7 Migrate hint parser to fully use logging
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-30 17:11:10 +00:00
Niels Thykier
5e825043d3 Replace "print" logging with the "logging" module
This commit rewrites the make-shift "log" methods to use the logging
framework without requiring changes to the callers.  This will be done
in a latter commit to keep things reviewable.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-30 17:11:09 +00:00
Paul Gevers
011e9a14b7
Merge branch 'master' into autopkgtest 2018-02-11 20:58:54 +01:00
Niels Thykier
bc0a5f6e2b britney: Split "ood" and "unsat_deps" loops
The "Out of date" binaries loop has gotten too complex to also handle
the "unsatisifiable dependency" check.  Concretely, we failed to
generate proper excuses for arch:all packages due to this.

Separate the two loops to restore the arch:all check.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-07 13:16:08 +00:00
Paul Gevers
fd03083ea5
Merge branch 'master' into autopkgtest 2017-11-28 20:19:48 +01:00
Niels Thykier
5c3229467a write_heidi: Include cruft arch:all packages in the output
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-19 21:47:38 +00:00
Paul Gevers
0b58a313cb
Treat arch:all nearly as regular arch when determining out-of-dateness
Closes #859566
2017-11-17 18:21:15 +01:00
Niels Thykier
ee27d7a67c Add BuildDependsPolicy to check Build-Depends(-Arch) availability
Add a new "BuildDependsPolicy" that will check the satisfiability of
the build-dependencies listed in the Build-Depends and
Build-Depends-Arch fields.  This enables gating of packages based on
missing / broken build-dependencies.

There are some limitations:

 * Build-Depends-Indep is ignored for now.  Missing or broken packages
   listed in Build-Depends-Indep will be continue to be silently
   ignored.

 * Being a policy check, it does not enforce "self-containedness" as
   a package can still migrate before a build-dependency.  However,
   this can only happen if the build-dependency is ready to migrate
   itself.  If the build-dependency is not ready (e.g. new RC bugs),
   then packages build-depending on it cannot migrate either (unless
   the version in testing satisfies there requirements).

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-11 15:49:48 +00:00
Niels Thykier
c537f0554f Move PolicyVerdict to britney2.policies 2017-11-02 19:31:11 +00:00
Niels Thykier
784d80ab4c Replace a few lists with sets
We basically use them as sets and do not need to rely on the ordering,
so we might as well just turn them into proper sets.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-02 19:30:40 +00:00
Paul Gevers
089c4f6e57
Rename new excuse field and method to unsatisfiable_on_archs and add_unsatisfiable_on_arch 2017-10-24 22:06:35 +02:00
Paul Gevers
a16e4e5a55
Enable autopkgtesting on built arches when not all have been built yet
- autopkgtest now honors break_arches option
- incomplete testing is now treated with penalty behavior
2017-10-24 20:46:21 +02:00
Paul Gevers
eb60fc557e
Implement bounty/penalty system for autopkgtest 2017-10-15 21:42:51 +02:00
Paul Gevers
f2a121bf55
Merge branch 'master' into autopkgtest 2017-10-14 20:17:32 +02:00
Paul Gevers
278b3dcdd0
autopkgtest: switch from testing=series to testing=testing 2017-09-08 11:08:22 +02:00
Paul Gevers
77bb15e0e8
Plug in the new autopkgtest policy 2017-09-08 11:06:33 +02:00
Paul Gevers
4dda7b6e7e
Add britney option: --series
- autopkgtest tests rely on it
- Ubuntu uses this
2017-09-08 11:06:20 +02:00
Adam D. Barratt
3220710a6c britney.py: stop referring to the freeze policy while we're not frozen
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2017-09-08 07:43:11 +00:00
Niels Thykier
d3b90e754b britney: Rewrite conditional assignment
The original method confused IntelliJ into thinking that binary_t was
a boolean rather than an object.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-09-02 11:10:58 +00:00
Niels Thykier
5021053db5 Support doing migration-less runs
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08 06:21:26 +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
6e560c854a Only show the first (relevant) remove hint in excuses
In the unlike case that there are multiple removal hints, showing
the first valid hint should be sufficient.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
045ce2bf7b britney: Don't show "fake" packages in excuses
They are implementation details and should not appear in the excuses.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
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
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
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
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
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
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
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
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