Merge lp:~racb/ubuntu-archive-tools/sru-notify-other-series-2 into lp:ubuntu-archive-tools

Proposed by Robie Basak
Status: Merged
Merged at revision: 1470
Proposed branch: lp:~racb/ubuntu-archive-tools/sru-notify-other-series-2
Merge into: lp:ubuntu-archive-tools
Diff against target: 52 lines (+26/-1)
2 files modified
sru-review (+2/-1)
sru_workflow.py (+24/-0)
To merge this branch: bzr merge lp:~racb/ubuntu-archive-tools/sru-notify-other-series-2
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Ubuntu Package Archive Administrators Pending
Review via email: mp+400941@code.launchpad.net

This proposal supersedes a proposal from 2021-04-12.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sru-review'
2--- sru-review 2020-10-23 19:29:46 +0000
3+++ sru-review 2021-04-12 05:02:50 +0000
4@@ -44,7 +44,7 @@
5 from contextlib import ExitStack
6 from launchpadlib.launchpad import Launchpad
7 from lazr.restfulclient.errors import ServerError
8-from sru_workflow import process_bug
9+from sru_workflow import process_bug, check_additional_series
10 from time import sleep
11
12
13@@ -395,6 +395,7 @@
14 'running:\nsru-accept -p %s -s %s -v %s %s' %
15 (upload.package_name, upload.distroseries.name,
16 upload.package_version, bug_num))
17+ check_additional_series(launchpad, sourcepkg)
18
19 else:
20 print("REJECT the package from -proposed? [yN] ", end="")
21
22=== modified file 'sru_workflow.py'
23--- sru_workflow.py 2020-03-05 15:28:28 +0000
24+++ sru_workflow.py 2021-04-12 05:02:50 +0000
25@@ -146,3 +146,27 @@
26 'the package has been in -proposed for a minimum of 7 days.' %
27 (release, release, release))
28 bug.newMessage(content=text, subject='Please test proposed package')
29+
30+
31+def check_additional_series(launchpad, sourcepkg):
32+ """Check if the package still exists in any Unapproved queue
33+
34+ Look for the given package name in the proposed pocket of the Unapproved
35+ queue of all supported Ubuntu series. If such uploads exist, print their
36+ series names.
37+
38+ :param launchpad: the launchpadlib Launchpad instance
39+ :param str sourcepkg: the name of the source package to check
40+ """
41+ additional_series = {
42+ series.name
43+ for series in launchpad.distributions['ubuntu'].series_collection
44+ if series.supported and series.getPackageUploads(
45+ name=sourcepkg,
46+ status='Unapproved',
47+ pocket='Proposed',
48+ exact_match=True,
49+ )
50+ }
51+ if additional_series:
52+ print("%s is also unapproved in %s" % (sourcepkg, ', '.join(additional_series)))

Subscribers

People subscribed via source and target branches