38 Commits

Author SHA1 Message Date
Steve Langasek
82fad57aa9 Don't use expensive 'remove' hints
Since we've never used remove hints in Ubuntu and never will, we shouldn't
pay the cost for them in britney runs.  Remove references to them entirely,
to speed up britney runs.

This is an Ubuntu delta not expected to be upstreamed, and can be dropped at
some future point when we don't have 11,000 active hints.  (This count of
hints is expected to drop dramatically once we have autopkgtest baseline
retesting.)
2021-10-06 12:54:11 -07:00
Steve Langasek
1f520269de Iterate over binary packages from a source package before iterating over hints
The existing code attempts to "short circuit" processing of binaries in
unstable by first checking if the package is subject to a removal hint.

This is invalid in Ubuntu for two reasons:
- we do not use removal hints for removing packages from the release pocket
- there are 11,000 hints in Ubuntu (due to force-reset-test) - searching all
  hints is time-consuming and not a short-circuit at all.

Reorder the code so we only scan the hints if there's otherwise an
indication of something to do.
2021-10-05 13:21:44 -07:00
Michael Hudson-Doyle
dfe2205bc7 add a message when list of valid/invalid excuses fails to validate 2020-11-20 17:37:44 +00:00
Iain Lane
8fb4d5d841 BlockPolicy, ExcuseFinder: refer to DISTRO-release
On Ubuntu we want this to say ubuntu-release, on Debian debian-release.
Substitute the first part with the name of the distro.
2020-11-20 17:37:44 +00:00
Iain Lane
a5828a269e excusefinder: Support not having arch-all buildds
On some distros (Ubuntu), arch:all packages are built along with one of
the architectures. We shouldn't be listing 'all' as its own arch in this
case. Instead we filter out the binaries except for on the
'all_buildarch'.
2020-11-20 17:37:44 +00:00
Colin Watson
65351ba511 buildd.debian.org -> launchpad.net 2020-11-20 17:37:44 +00:00
Iain Lane
5b5c99e401 excuse, excusefinder: Allow excuses to invalidate each other
Sometimes (for the LinuxPolicy), excuses don't have enough information
when they are processed. They need to defer some of their work until
another excuse has been evaluated and then perhaps get invalidated.

Introduce the concept of "external invalidation" to deal with this. A
policy can keep references to other excuses around, and then invalidate
them later (when processing another one). The excuse finder needs to
know this happened to remove the excuse from the list of "actionable
excuses".

For example. The Linux policy invalidates linux-foo if linux-meta-foo is
invalid. If linux-foo is encountered first, we will not yet know if
linux-meta-foo is going to be invalid. We effectively defer the
evaluation until after linux-meta-foo has been dealt with, and then we
know whether we need to invalidate linux-foo or not.
2020-11-11 09:41:40 +00:00
Colin Watson
964e414dbe Add a --distribution option 2020-10-20 14:57:51 +01:00
Colin Watson
5f95cf771e Only issue "From wrong source" for binaries not at the same version in testing
Same-version could happen for merged binaries in partial-unstable mode.
2020-10-20 14:57:51 +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
4a8fb58f91 Use versioned items in excusefinder 2020-01-30 18:40:24 +01:00
Ivo De Decker
e70457f137 Add logger to ExcuseFinder 2020-01-30 18:40:24 +01:00
Ivo De Decker
055f0f07e5 Add MigrationItem to Excuse 2020-01-30 15:09:17 +00:00
Ivo De Decker
a425e32984 Remove _excuse_unsat_deps
This should now be handled by the depends policy.
2020-01-30 15:09:17 +00:00
Ivo De Decker
2ccb056fa1 validate list of valid excuses 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
b5285f21d7 Track packages (source and binary) for excuses 2020-01-30 15:09:11 +00:00
Ivo De Decker
6ca84132f9 Excuses: remove unused sane_deps
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2020-01-03 19:43:47 +00:00
Ivo De Decker
a1debec1a8 fix codestyle issues in excusefinder.py 2019-09-04 11:44:15 +00:00
Ivo De Decker
4cbb691dfe Remove broken depends code in _should_upgrade_src
The code that was supposed to check uninstallability of existing binaries was
broken:
- it only checked arch: all on nobreakall archs, not arch any
- it checked if the new binary was in testing (this never happens)
- it doesn't work when binaries from both unstable and tpu are needed

Note that _excuse_unsat_deps() now handles nobreakall correctly.
2019-09-04 11:44:14 +00:00
Ivo De Decker
ccd30f96fd switch depends to detailed excuse info
don't show information about unsatisfiable depends that is not blocking
migration:
* arch all not on nobreakall arch
* arch any or arch all on breakarch
2019-09-04 11:44:13 +00:00
Ivo De Decker
a4f7e7433e switch impossible depends to detailed excuse info 2019-09-04 11:44:13 +00:00
Ivo De Decker
03856a3876 switch missing builds to detailed excuse info
Also remove the list of old binaries from the excuse.
2019-09-04 11:44:13 +00:00
Ivo De Decker
e25ca70427 switch removal to detailed excuse info
Also, set verdict to REJECTED_PERMANENTLY explicitly. This was already done
implicitly, because that is the default and it was never set to anything else.
2019-09-04 11:44:13 +00:00
Ivo De Decker
e245891d36 add reason for missing build 2019-09-04 11:44:12 +00:00
Ivo De Decker
cda4655b83 switch newer in testing to detailed excuse info
Also, set verdict to REJECTED_PERMANENTLY explicitly. This was already done
implicitly, because that is the default and it was never set to anything else.
2019-09-04 11:44:12 +00:00
Ivo De Decker
e144cbc743 switch wrong versions in should_upgrade_srcarch to detailed excuse info 2019-09-04 11:44:12 +00:00
Ivo De Decker
56dad96c2b switch unimportant info in should_upgrade_srcarch to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
4b40b11b07 switch force info to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
409deee905 switch missing builds to detailed excuse info 2019-09-04 11:44:11 +00:00
Ivo De Decker
63a9d786a8 switch no binaries to detailed excuse info 2019-09-04 11:44:11 +00:00
Paul Gevers
eb3fb3ef6e
Add support for partial source suites via options 2019-04-27 22:35:09 +02: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
97abb6f467
ExcuseFinder: Reduce the number of migration items created
With this change, we reduce the number of migration items creted only
to be discarded because the item is not relevant/actionable.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:58:05 +00:00
Niels Thykier
78d120114f
ExcuseFinder: Merge two loops
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:58:04 +00:00
Niels Thykier
9a0a99abc9
ExcuseFinder: Have _should_* work on migration items
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:58:03 +00:00
Niels Thykier
d9f9c6d4a9
Let ExcuseFinder create migration items
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:58:02 +00:00
Niels Thykier
6dde43a339
Create an ExcuseFinder class for computing relevant excuses
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-27 06:58:00 +00:00