From 79d1bdec0b7a6fb403c2c80a6196fe18a3562231 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 13 Apr 2020 18:56:38 -0700 Subject: [PATCH] check for force hints as part of the source ppa policy If our policy marks a bunch of related packages here as non-candidates, a force hint processed later for the package which was not a candidate is insufficient. Instead, check here for a force hint that would unconditionally mark a package a candidate before marking related packages as non-candidates. --- britney2/policies/sourceppa.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/britney2/policies/sourceppa.py b/britney2/policies/sourceppa.py index 88bb385..35100c7 100644 --- a/britney2/policies/sourceppa.py +++ b/britney2/policies/sourceppa.py @@ -87,6 +87,14 @@ class SourcePPAPolicy(BasePolicy, Rest): if not [team for team in INCLUDE if team in sourceppa]: return PolicyVerdict.PASS + # check for a force hint; we have to check here in addition to + # checking in britney.py, otherwise /this/ package will later be + # considered valid candidate but all the /others/ from the ppa will + # be invalidated via this policy and not fixed by the force hint. + if self.hints.search('force', package=source_name, + version=source_data_srcdist.version): + accept = True + shortppa = sourceppa.replace(LAUNCHPAD_URL, '') sourceppa_info[source_name] = shortppa # Check for other packages that might invalidate this one