105 Commits

Author SHA1 Message Date
Iain Lane
c604cd9974
BuildDependsPolicy: Make linux* wait on corresponding -meta package
We want to treat linux-$flavor and linux-meta-$flavor as one set in
britney which goes in together or not at all. We never want to promote
linux-$flavor without the accompanying linux-meta-$flavor.

Introduce a synthetic linux* → linux-meta* build-dependency to enforce
this grouping.
2020-07-06 12:30:23 +01:00
Iain Lane
3bfc0321c9
Implement Ubuntu component relationship constraints (ogre model) 2020-07-06 12:30:22 +01:00
Colin Watson
dbb9883380
Allow blocking uploads by way of bugs with the block-proposed tag set 2020-06-29 18:25:41 +01:00
Colin Watson
843751c5cf
Change date format to seconds-since-epoch 2020-06-29 18:25:40 +01:00
Colin Watson
3b8daa98ec
Make sure that containing directories exist before writing output files 2020-06-11 13:00:02 +01:00
Martin Pitt
883f01740f
Skip piuparts policy if summary file is missing 2020-06-11 13:00:02 +01:00
Colin Watson
af7da4e764
Skip bug-based processing if BugsV is missing 2020-06-11 13:00:02 +01:00
Colin Watson
ba3fec61c3
Use default urgency for all packages if Urgencies is missing 2020-06-11 13:00:02 +01:00
Ivo De Decker
920d82445d Add allow-smooth-update hint
Hint to allow smooth update, even if the section isn't allowed in the
configuration.

Note that this takes the source name and the source version IN TESTING
of the binaries that must be allowed to stay around to allow a smooth
update.
2020-04-01 16:37:56 +00:00
Ivo De Decker
2d34f8220e split off is_smooth_update_allowed() function 2020-04-01 15:49:14 +00:00
Ivo De Decker
e2b196dd4b Don't check implict depends when build is missing 2020-03-20 17:27:33 +00:00
Ivo De Decker
a08b7ebc48 Add implicit dependency policy
Based in part on patches by Niels Thykier <niels@thykier.net>

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2020-03-19 20:10:35 +01:00
Ivo De Decker
a567dfd58d Mark packages as uninstallable, even if this doesn't block migration
This allows the autopkgtest policy to skip tests for these packages.
2020-02-14 19:34:09 +00:00
Ivo De Decker
976accaf57 Track uninstallable arch:all packages on non-nobreakall archs
When an arch:all binary is uninstallable on a non-nobreakall arch, don't
block it, but still mark it as uninstallable, so the autopkgtest policy
knows not to schedule tests for it.
2020-01-30 18:41:39 +01:00
Ivo De Decker
4e5926a41f Add depends policy 2020-01-30 15:09:12 +00:00
Ivo De Decker
8b6638c566 Specify dependencies between excuses based on packages
Rework the dependencies between excuses.

Dependencies are specified based on packages (source or binary). Based
on these packages, dependencies on other excuses (that have these
packages) are calculated.

As with package dependencies, dependencies between excuses can contain
alternatives.

Each alternative can satisfy the dependency, so the excuse only becomes
invalid if all of the alternatives of a specific dependency are
invalidated.

Tracking of the alternatives and their validity is moved to separate
objects.
2020-01-30 15:09:12 +00:00
Ivo De Decker
4de569114a Fix excuses output for package with urgent hint
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-09-04 19:51:34 +00:00
Ivo De Decker
4a3f98657d Remove unimportant message from excuses
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-09-04 17:34:34 +02:00
Ivo De Decker
8cff83a8c6 remove obsolete message in bugs policy 2019-09-04 11:44:13 +00:00
Ivo De Decker
68b051d36d switch bugs policy to detailed excuse info
Also, simplify the logic.
2019-09-04 11:44:13 +00:00
Ivo De Decker
8c44a78948 switch block policy to detailed excuse info 2019-09-04 11:44:12 +00:00
Ivo De Decker
3d0fdae9d1 switch build-dep policy to detailed excuse info 2019-09-04 11:44:12 +00:00
Ivo De Decker
bb2512c948 add extra info to buildd policy 2019-09-04 11:44:12 +00:00
Ivo De Decker
3576ed6667 switch buildd policy to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
deb27e7ec0 switch built-using policy to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
76f33a5fc2 switch piuparts policy to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
370bf52d56 switch age policy to detailed excuse info 2019-09-04 11:44:10 +00:00
Ivo De Decker
19392f63c2 fix codestyle issues in policy_.py 2019-09-03 23:50:00 +02:00
Ivo De Decker
8b0803e3bb Buildd: don't block binnmu with maintainer arch: all
When the arch: all packages were uploaded by the maintainer, a binnmu (built
on the buildds) shouldn't be blocked, because it doesn't contain the arch: all
binaries anyway.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-08-08 23:00:59 +00:00
Ivo De Decker
208726f538 Add BuiltOnBuilddPolicy
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-07-06 09:18:16 +00: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
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
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
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
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