Merge ~juliank/britney/+git/britney2-ubuntu:dont-group-ppc64el-rebuilds into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Julian Andres Klode
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: f078aa28d099d48725c7301d3166e7ae80b40ddf
Merged at revision: f078aa28d099d48725c7301d3166e7ae80b40ddf
Proposed branch: ~juliank/britney/+git/britney2-ubuntu:dont-group-ppc64el-rebuilds
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 20 lines (+3/-0)
1 file modified
britney2/policies/sourceppa.py (+3/-0)
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Andy Whitcroft Approve
Review via email: mp+417726@code.launchpad.net

Description of the change

Untested, but syntax parsed :D

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

This is a hotfix so we get the ppc64el rebuilds moving again, but really should be configurable via hints long term.

Revision history for this message
Andy Whitcroft (apw) wrote :

That is a lot of a horror show ... that syntax is nasty, nasty, nasty. (Python I hate you.)

As far as I can see this would work as a temporary work-around. Someone needs to rip it out once it has done its thing.

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Let's do this then.

review: Approve
Revision history for this message
Julian Andres Klode (juliank) wrote :

@apw Normally I'd write

    if any(team in sourceppa for team in EXCLUDE)

but was following the line below :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/britney2/policies/sourceppa.py b/britney2/policies/sourceppa.py
2index ea01e76..b203fb8 100644
3--- a/britney2/policies/sourceppa.py
4+++ b/britney2/policies/sourceppa.py
5@@ -15,6 +15,7 @@ from britney2.policies.policy import BasePolicy, PolicyVerdict
6 LAUNCHPAD_URL = "https://api.launchpad.net/1.0/"
7 PRIMARY = LAUNCHPAD_URL + "ubuntu/+archive/primary"
8 INCLUDE = ["~bileto-ppa-service/", "~ci-train-ppa-service/"]
9+EXCLUDE = ["~ci-train-ppa-service/+archive/ubuntu/4810", "~ci-train-ppa-service/+archive/ubuntu/4815", "~ci-train-ppa-service/+archive/ubuntu/4816"]
10
11
12 class SourcePPAPolicy(BasePolicy, Rest):
13@@ -105,6 +106,8 @@ class SourcePPAPolicy(BasePolicy, Rest):
14 sourceppa = self.lp_get_source_ppa(source_name, version) or ""
15 verdict = excuse.policy_verdict
16 self.source_ppas_by_pkg[source_name][version] = sourceppa
17+ if [team for team in EXCLUDE if team in sourceppa]:
18+ return PolicyVerdict.PASS
19 if not [team for team in INCLUDE if team in sourceppa]:
20 return PolicyVerdict.PASS
21

Subscribers

People subscribed via source and target branches