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
=== modified file 'sru-review'
--- sru-review 2020-10-23 19:29:46 +0000
+++ sru-review 2021-04-12 05:02:50 +0000
@@ -44,7 +44,7 @@
44from contextlib import ExitStack44from contextlib import ExitStack
45from launchpadlib.launchpad import Launchpad45from launchpadlib.launchpad import Launchpad
46from lazr.restfulclient.errors import ServerError46from lazr.restfulclient.errors import ServerError
47from sru_workflow import process_bug47from sru_workflow import process_bug, check_additional_series
48from time import sleep48from time import sleep
4949
5050
@@ -395,6 +395,7 @@
395 'running:\nsru-accept -p %s -s %s -v %s %s' %395 'running:\nsru-accept -p %s -s %s -v %s %s' %
396 (upload.package_name, upload.distroseries.name,396 (upload.package_name, upload.distroseries.name,
397 upload.package_version, bug_num))397 upload.package_version, bug_num))
398 check_additional_series(launchpad, sourcepkg)
398399
399 else:400 else:
400 print("REJECT the package from -proposed? [yN] ", end="")401 print("REJECT the package from -proposed? [yN] ", end="")
401402
=== modified file 'sru_workflow.py'
--- sru_workflow.py 2020-03-05 15:28:28 +0000
+++ sru_workflow.py 2021-04-12 05:02:50 +0000
@@ -146,3 +146,27 @@
146 'the package has been in -proposed for a minimum of 7 days.' %146 'the package has been in -proposed for a minimum of 7 days.' %
147 (release, release, release))147 (release, release, release))
148 bug.newMessage(content=text, subject='Please test proposed package')148 bug.newMessage(content=text, subject='Please test proposed package')
149
150
151def check_additional_series(launchpad, sourcepkg):
152 """Check if the package still exists in any Unapproved queue
153
154 Look for the given package name in the proposed pocket of the Unapproved
155 queue of all supported Ubuntu series. If such uploads exist, print their
156 series names.
157
158 :param launchpad: the launchpadlib Launchpad instance
159 :param str sourcepkg: the name of the source package to check
160 """
161 additional_series = {
162 series.name
163 for series in launchpad.distributions['ubuntu'].series_collection
164 if series.supported and series.getPackageUploads(
165 name=sourcepkg,
166 status='Unapproved',
167 pocket='Proposed',
168 exact_match=True,
169 )
170 }
171 if additional_series:
172 print("%s is also unapproved in %s" % (sourcepkg, ', '.join(additional_series)))

Subscribers

People subscribed via source and target branches