Merge ~juliank/britney/+git/britney2-ubuntu:no-testing-triggers into ~ubuntu-release/britney/+git/britney2-ubuntu:master

Proposed by Julian Andres Klode
Status: Merged
Merged at revision: d9d6261b0cb032b3dd3f459248a6a950f1c8f1af
Proposed branch: ~juliank/britney/+git/britney2-ubuntu:no-testing-triggers
Merge into: ~ubuntu-release/britney/+git/britney2-ubuntu:master
Diff against target: 42 lines (+11/-6)
1 file modified
britney2/policies/autopkgtest.py (+11/-6)
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+411459@code.launchpad.net

Description of the change

hmm found this lying around, thought it was merged? don't remember what happened there.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py
2index 7f970be..5faba7e 100644
3--- a/britney2/policies/autopkgtest.py
4+++ b/britney2/policies/autopkgtest.py
5@@ -562,6 +562,7 @@ class AutopkgtestPolicy(BasePolicy):
6 pkg_universe = self.britney.pkg_universe
7 target_suite = self.suite_info.target_suite
8 source_suite = item.suite
9+ sources_t = target_suite.sources
10 sources_s = item.suite.sources
11 packages_s_a = item.suite.binaries[arch]
12 source_name = item.package
13@@ -646,9 +647,11 @@ class AutopkgtestPolicy(BasePolicy):
14 if binary.architecture == arch:
15 try:
16 source_of_bin = packages_s_a[binary.package_name].source
17- triggers.add(
18- source_of_bin + '/' +
19- sources_s[source_of_bin].version)
20+ if (sources_t.get(source_of_bin, None) is None or
21+ sources_s[source_of_bin].version != sources_t[source_of_bin].version):
22+ triggers.add(
23+ source_of_bin + '/' +
24+ sources_s[source_of_bin].version)
25 except KeyError:
26 # Apparently the package was removed from
27 # unstable e.g. if packages are replaced
28@@ -657,9 +660,11 @@ class AutopkgtestPolicy(BasePolicy):
29 if binary not in source_data_srcdist.binaries:
30 for tdep_src in self.testsuite_triggers.get(binary.package_name, set()):
31 try:
32- triggers.add(
33- tdep_src + '/' +
34- sources_s[tdep_src].version)
35+ if (sources_t.get(tdep_src, None) is None or
36+ sources_s[tdep_src].version != sources_t[tdep_src].version):
37+ triggers.add(
38+ tdep_src + '/' +
39+ sources_s[tdep_src].version)
40 except KeyError:
41 # Apparently the source was removed from
42 # unstable (testsuite_triggers are unified

Subscribers

People subscribed via source and target branches