155 Commits

Author SHA1 Message Date
Ivo De Decker
208726f538 Add BuiltOnBuilddPolicy
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-07-06 09:18:16 +00:00
Paul Gevers
85d10a27d2
Take suite name from Release file if it exist 2019-05-18 21:40:26 +02:00
Paul Gevers
86c728321e
autopkgtest.py: Lower the logging level for lots of messages 2019-04-13 10:39:29 +02:00
Niels Thykier
c741b03aaf
Make PolicyVerdict ordered/comparable
This shortens the annyoing "a.value < b.value" to "a < b".

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-03-06 19:07:17 +00:00
Niels Thykier
6875272618
AgePolicy: Update age-requirement in excuses to match hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-03-05 19:29:16 +00:00
Mattia Rizzolo
bc0fb3f61d
Display bounty/penalty information only if they would actually be changing anything
This avoid messages like
    Required age reduced by 0 days because of autopkgtest
that is hardly useful.

Signed-off-by: Mattia Rizzolo <mattia@debian.org>
2019-02-21 12:41:40 +01:00
Niels Thykier
198e257a91
autopkgtest: Move cache upgrade into its own function
The intialise method is already complex enough and this was a trivial
snippet to extract to reduce the complexity a bit.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-11 21:27:46 +00:00
Niels Thykier
cd654183b7
autopkgtest: Extract some ("boring") loops into a function
When we convert legacy results in the autopkgtest-results.cache file,
we are only touching leaf results.  By moving the loops into a
function, we can remove 2-3 levels of ("redundant") nesting.  This in
turn makes it more clear what is relevant in the conversion.

This same also holds in save_state when we convert an Enum to a
string.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-11 21:05:55 +00:00
Niels Thykier
fce1fe5c27
autopkgtests: Move some common code into a function
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-11 21:00:13 +00:00
Paul Gevers
7611231ee2
Fix all pycodestyle issues in b/p/autopkgtest.py 2019-02-07 13:35:52 +01:00
Paul Gevers
992b27abb3
autopkgtest: retrigger old failures 2019-02-07 13:35:52 +01:00
Paul Gevers
42ac9c34a1
autopkgtest: add timestamp to results 2019-01-31 15:37:13 +01:00
Niels Thykier
f4ecd86000
Pass migration items to policies (instead of src + suite)
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 09:52:33 +00:00
Niels Thykier
59633a92b5
Clone all_buildarchs before mutating it
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:55:49 +00:00
Paul Gevers
16f823dd91 autopkgtest: in Debian we want linux to be treated as any other 2019-01-21 20:22:59 +00:00
Paul Gevers
1ca76486b5
Replace libreoffice with doxygen as the libgcc smoke test for gcc.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1793260

Original patches by Steve Langasek
2019-01-20 21:33:30 +01:00
Niels Thykier
4eb038ab6d
autopkgtest: Move field creation into __init__
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 22:12:14 +00:00
Paul Gevers
1ecb07ac2d
autopkgtest: bug fix in baseline cache 2019-01-19 20:14:31 +01:00
Paul Gevers
075d4d823b
autopkgtest: fix copy() in save_state 2019-01-19 20:13:00 +01:00
Paul Gevers
c6c5c45287
autopkgtest: tiny change for easier understanding 2019-01-19 20:12:51 +01:00
Paul Gevers
d038e7bbe6
autopkgtest: simplify bin_triggers logic/naming 2019-01-19 20:12:41 +01:00
Niels Thykier
427328821e
Remove redundant variables
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:56:10 +00:00
Niels Thykier
b0835fa4a1
Fix pycodestyle warnings
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:51:16 +00:00
Ivo De Decker
66648c1a03
Add BuiltUsingPolicy
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 12:45:07 +00:00
Ivo De Decker
35ae8848b4
Fix apply_src_policies when policy is applied on multiple archs
Move the logic of apply_src_policy and apply_srcarch_policy into PolicyEngine.

This fixes an issue with the excuses.yaml output introduced in commit
15e5228669: only the last verdict was added to the excuse info for that
policy.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 12:45:05 +00:00
Niels Thykier
c9d523da93
Remove trailing whitespace
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:03:34 +00:00
Ivo De Decker
cd08deb943 Fix build-dep check for source with only arch: all binaries
When a source has only arch: all binaries, the Build-Depends had no relevant
architectures, so the check was skipped. Instead check it on any architecture,
just like Build-Depends-Indep.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 09:45:52 +00:00
Ivo De Decker
15e5228669 Add src_policy option to policies.
The src_policy defines wether, for source items, the source policy should be
run (RUN_SRC, the default), the arch policy should be run on every arch
(RUN_ON_EVERY_ARCH_ONLY), or both (RUN_SRC_AND_EVERY_ARCH).

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-17 18:40:39 +00:00
Niels Thykier
82fa58df20 Extract a compute_item_name method
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-16 22:37:23 +00:00
Ivo De Decker
97ed917db4 Sort some data for deterministic output in excuses
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-16 22:37:23 +00:00
Niels Thykier
f928c7ed3d Make SourcePackage.binaries a set
The recent code changes made use remove from the "binaries" field in
SourcePackages.  Lists are not particularly optimized for this kind
of removal and we have a few source packages with a lot of binary
packages (e.g. libreoffice, gcc-X-cross{,-ports}) that might trip
poor performance.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-14 13:19:05 +00:00
Niels Thykier
6c3f8354e5
BlockPolicy: Compile regex once rather than once per migration item
Regex compilation is often rather expensive and in this case, we can
do it once instad of once per migration item.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-07 21:20:39 +00:00
Niels Thykier
c4371b9f58
BlockPolicy: Replace print with logger.info
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-07 21:07:43 +00:00
Niels Thykier
603aa9fdca
Drop unused local variables
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-06 11:03:47 +00:00
Ivo De Decker
f1cd87dc9c Check build-depends-indep
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:53 +00:00
Ivo De Decker
1c115eee11 For build-depends-indep, only add best result
This is based on the first architecture that had this result.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:53 +00:00
Ivo De Decker
3f575a1cd0 For b-d-indep track best result and archs per result
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:53 +00:00
Ivo De Decker
fa44a3f968 Implement get_check_archs for build-depends-indep
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:53 +00:00
Ivo De Decker
65128a13b7 Read all_buildarch config option
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:52 +00:00
Ivo De Decker
a28a7665f3 Split off adding build-dep info into separate function
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:52 +00:00
Ivo De Decker
07643f4c30 Define BuildDepResult object (based on IntEnum)
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-05 12:53:52 +00:00
Ivo De Decker
c9148d475a Get dependency type from variable
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-04 23:42:16 +00:00
Ivo De Decker
ccbaedab1d Split of _get_check_archs into separate function
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-04 23:42:16 +00:00
Ivo De Decker
a073e35940 BuildDependsPolicy: split off checking in separate function
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-04 23:42:16 +00:00
Ivo De Decker
0709f8d96c Move block handling to BlockPolicy
Note that this now also applies to binNMUs. A source block also blocks
binaries. Binaries on a specific architecture can be unblock with an
architecture-specific unblock hint.

This also means all binaries from non-primary suites
(testing-proposed-updates, etc) need approval.

Closes: #916209
2019-01-04 17:24:38 +00:00
Ivo De Decker
49d9a38d25 Skip unimplemented policies in excuses
Return PolicyVerdict.NOT_APPLICABLE, which means no data is added to
policy_info in the excuse.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-02 00:34:49 +00:00
Ivo De Decker
7e05c0e5ac Apply policy to srcarch excuses
Currently no policy implements this.

A policy can now implement apply_src_policy_impl or apply_srcarch_policy_impl
(or both), so apply_src_policy_impl is no longer an abstractmethod.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-01 18:33:02 +00:00
Ivo De Decker
d0b5cc2ce1 Rename apply_policy to apply_src_policy
apply_src_policy expects an excuse with a new source and binaries. It doesn't
apply to srcarch excuses, which only have new binaries for an existing source.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-01 18:28:27 +00:00
Ivo De Decker
0d80bad65c Move handling of policies to PolicyEngine
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2018-12-31 19:15:29 +00:00
Niels Thykier
b16ae8046a
Add some '# pragma: no cover' for error cases, abstract methods, etc.
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 18:07:29 +00:00