Merge lp:~stevenk/launchpad/notify-announce-list into lp:launchpad
- notify-announce-list
- Merge into devel
Proposed by
Steve Kowalik
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13153 |
Proposed branch: | lp:~stevenk/launchpad/notify-announce-list |
Merge into: | lp:launchpad |
Diff against target: |
524 lines (+56/-84) 17 files modified
lib/lp/archiveuploader/nascentupload.py (+0/-1) lib/lp/archiveuploader/tests/nascentupload-announcements.txt (+7/-1) lib/lp/archiveuploader/tests/nascentupload-ddebs.txt (+2/-2) lib/lp/archiveuploader/tests/test_uploadprocessor.py (+1/-1) lib/lp/archiveuploader/tests/upload-karma.txt (+2/-2) lib/lp/archiveuploader/tests/uploadpolicy.txt (+0/-2) lib/lp/archiveuploader/uploadpolicy.py (+0/-9) lib/lp/soyuz/adapters/notification.py (+15/-13) lib/lp/soyuz/browser/queue.py (+1/-1) lib/lp/soyuz/doc/distroseriesqueue-notify.txt (+4/-7) lib/lp/soyuz/doc/distroseriesqueue.txt (+1/-1) lib/lp/soyuz/interfaces/queue.py (+2/-5) lib/lp/soyuz/model/queue.py (+6/-7) lib/lp/soyuz/scripts/queue.py (+8/-17) lib/lp/soyuz/scripts/tests/test_queue.py (+4/-5) lib/lp/soyuz/tests/test_packageupload.py (+1/-2) scripts/ftpmaster-tools/queue (+2/-8) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/notify-announce-list |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | Approve | ||
Review via email: mp+63067@code.launchpad.net |
Commit message
[r=wgrant][no-qa] Drop announce_list from notify() and PackageUpload.
Description of the change
Drop announce_list from the arguments for notify() and PackageUpload.
This now leaves announce notification up to the IDistroSeries.
I have discussed this change with Julian Edwards before implementing, and he agreed it was a good change.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/archiveuploader/nascentupload.py' |
2 | --- lib/lp/archiveuploader/nascentupload.py 2011-05-20 08:04:19 +0000 |
3 | +++ lib/lp/archiveuploader/nascentupload.py 2011-06-02 09:53:33 +0000 |
4 | @@ -855,7 +855,6 @@ |
5 | changes_file_object = open(self.changes.filepath, "r") |
6 | self.queue_root.notify( |
7 | summary_text=self.warning_message, |
8 | - announce_list=self.policy.announcelist, |
9 | changes_file_object=changes_file_object, |
10 | logger=self.logger) |
11 | changes_file_object.close() |
12 | |
13 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt' |
14 | --- lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-05-27 06:17:14 +0000 |
15 | +++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-06-02 09:53:33 +0000 |
16 | @@ -655,11 +655,17 @@ |
17 | DEBUG Body: |
18 | DEBUG bar (1.0-6) breezy; urgency=low |
19 | ... |
20 | - DEBUG No announcement sent |
21 | + DEBUG Announcing to hoary-announce@lists.ubuntu.com |
22 | ... |
23 | DEBUG You are receiving this email because you are the uploader, maintainer |
24 | or |
25 | DEBUG signer of the above package. |
26 | + DEBUG Would have sent a mail: |
27 | + DEBUG Subject: [ubuntu/hoary] bar 1.0-6 (Accepted) |
28 | + DEBUG Sender: Celso Providelo <cprov@ubuntu.com> |
29 | + DEBUG Recipients: hoary-announce@lists.ubuntu.com |
30 | + DEBUG Bcc: Root <root@localhost>, bar_derivatives@packages.qa.debian.org |
31 | + ... |
32 | |
33 | No emails generated: |
34 | |
35 | |
36 | === modified file 'lib/lp/archiveuploader/tests/nascentupload-ddebs.txt' |
37 | --- lib/lp/archiveuploader/tests/nascentupload-ddebs.txt 2011-03-03 00:43:44 +0000 |
38 | +++ lib/lp/archiveuploader/tests/nascentupload-ddebs.txt 2011-06-02 09:53:33 +0000 |
39 | @@ -39,7 +39,7 @@ |
40 | We don't really care where the source ends up, so we just accept the |
41 | default overrides. It is now pending publication. |
42 | |
43 | - >>> src.queue_root.acceptFromQueue("announce@example.com") |
44 | + >>> src.queue_root.acceptFromQueue() |
45 | >>> print src.queue_root.status.name |
46 | DONE |
47 | |
48 | @@ -91,7 +91,7 @@ |
49 | |
50 | >>> bin.queue_root.overrideBinaries(main, devel, None, [main, universe]) |
51 | True |
52 | - >>> bin.queue_root.acceptFromQueue('announce@example.com') |
53 | + >>> bin.queue_root.acceptFromQueue() |
54 | |
55 | >>> print bin.queue_root.status.name |
56 | ACCEPTED |
57 | |
58 | === modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py' |
59 | --- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2011-05-20 03:28:24 +0000 |
60 | +++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2011-06-02 09:53:33 +0000 |
61 | @@ -1438,7 +1438,7 @@ |
62 | # just-uploaded changesfile from librarian. |
63 | self.layer.txn.commit() |
64 | |
65 | - upload.queue_root.acceptFromQueue('announce@ubuntu.com') |
66 | + upload.queue_root.acceptFromQueue() |
67 | |
68 | # 'biscuit_1.0-2' building on i386 get accepted and published. |
69 | packager.buildVersion('1.0-2', suite=self.breezy.name, arch="i386") |
70 | |
71 | === modified file 'lib/lp/archiveuploader/tests/upload-karma.txt' |
72 | --- lib/lp/archiveuploader/tests/upload-karma.txt 2010-12-02 16:13:51 +0000 |
73 | +++ lib/lp/archiveuploader/tests/upload-karma.txt 2011-06-02 09:53:33 +0000 |
74 | @@ -33,7 +33,7 @@ |
75 | |
76 | >>> from canonical.database.sqlbase import commit |
77 | >>> commit() |
78 | - >>> bar_src.queue_root.acceptFromQueue("announce@example.com") |
79 | + >>> bar_src.queue_root.acceptFromQueue() |
80 | Karma added: action=distributionuploadaccepted, distribution=ubuntu |
81 | |
82 | As can be seen, karma was added for the package creator. |
83 | @@ -55,7 +55,7 @@ |
84 | >>> key = getUtility(IGPGKeySet).getGPGKeysForPeople([name16])[0] |
85 | >>> removeSecurityProxy(foo_src.queue_root).signing_key = key |
86 | >>> commit() |
87 | - >>> foo_src.queue_root.acceptFromQueue("announce@example.com") |
88 | + >>> foo_src.queue_root.acceptFromQueue() |
89 | Karma added: action=distributionuploadaccepted, distribution=ubuntu |
90 | Karma added: action=sponsoruploadaccepted, distribution=ubuntu |
91 | |
92 | |
93 | === modified file 'lib/lp/archiveuploader/tests/uploadpolicy.txt' |
94 | --- lib/lp/archiveuploader/tests/uploadpolicy.txt 2010-10-18 22:24:59 +0000 |
95 | +++ lib/lp/archiveuploader/tests/uploadpolicy.txt 2011-06-02 09:53:33 +0000 |
96 | @@ -71,8 +71,6 @@ |
97 | >>> buildd_policy.setDistroSeriesAndPocket("hoary") |
98 | >>> print buildd_policy.distroseries.name |
99 | hoary |
100 | - >>> print buildd_policy.announcelist |
101 | - hoary-changes@ubuntu.com |
102 | |
103 | Policies can make decisions based on whether or not they want to |
104 | approve an upload automatically (I.E. move it straight to ACCEPTED |
105 | |
106 | === modified file 'lib/lp/archiveuploader/uploadpolicy.py' |
107 | --- lib/lp/archiveuploader/uploadpolicy.py 2011-05-27 19:53:20 +0000 |
108 | +++ lib/lp/archiveuploader/uploadpolicy.py 2011-06-02 09:53:33 +0000 |
109 | @@ -150,15 +150,6 @@ |
110 | if self.archive is None: |
111 | self.archive = self.distroseries.main_archive |
112 | |
113 | - @property |
114 | - def announcelist(self): |
115 | - """Return the announcement list address.""" |
116 | - announce_list = getattr(self.options, 'announcelist', None) |
117 | - if (announce_list is None and |
118 | - getattr(self, 'distroseries', None) is not None): |
119 | - announce_list = self.distroseries.changeslist |
120 | - return announce_list |
121 | - |
122 | def checkUpload(self, upload): |
123 | """Mandatory policy checks on NascentUploads.""" |
124 | if self.archive.is_copy: |
125 | |
126 | === modified file 'lib/lp/soyuz/adapters/notification.py' |
127 | --- lib/lp/soyuz/adapters/notification.py 2011-05-27 21:12:25 +0000 |
128 | +++ lib/lp/soyuz/adapters/notification.py 2011-06-02 09:53:33 +0000 |
129 | @@ -115,9 +115,8 @@ |
130 | |
131 | |
132 | def notify(blamer, spr, bprs, customfiles, archive, distroseries, pocket, |
133 | - announce_list=None, summary_text=None, changes=None, |
134 | - changesfile_content=None, changesfile_object=None, action=None, |
135 | - dry_run=False, logger=None): |
136 | + summary_text=None, changes=None, changesfile_content=None, |
137 | + changesfile_object=None, action=None, dry_run=False, logger=None): |
138 | """Notify about |
139 | |
140 | :param blamer: The `IPerson` who is to blame for this notification. |
141 | @@ -127,7 +126,6 @@ |
142 | :param archive: The target `IArchive`. |
143 | :param distroseries: The target `IDistroSeries`. |
144 | :param pocket: The target `PackagePublishingPocket`. |
145 | - :param announce_list: Where to announce the upload. |
146 | :param summary_text: The summary of the notification. |
147 | :param changes: A dictionary of the parsed changes file. |
148 | :param changesfile_content: The raw content of the changes file, so it |
149 | @@ -203,7 +201,7 @@ |
150 | spr, bprs, customfiles, archive, distroseries, pocket, action) |
151 | body = assemble_body( |
152 | blamer, spr, archive, distroseries, summarystring, changes, |
153 | - action, announce_list) |
154 | + action) |
155 | send_mail( |
156 | spr, archive, recipients, subject, body, dry_run, |
157 | changesfile_content=changesfile_content, |
158 | @@ -215,10 +213,12 @@ |
159 | # If we're sending an acceptance notification for a non-PPA upload, |
160 | # announce if possible. Avoid announcing backports, binary-only |
161 | # security uploads, or autosync uploads. |
162 | - if (action == 'accepted' and announce_list and not archive.is_ppa and |
163 | - pocket != PackagePublishingPocket.BACKPORTS and |
164 | - not (pocket == PackagePublishingPocket.SECURITY and spr is None) and |
165 | - not is_auto_sync_upload(spr, bprs, pocket, changes['Changed-By'])): |
166 | + if (action == 'accepted' and distroseries.changeslist |
167 | + and not archive.is_ppa |
168 | + and pocket != PackagePublishingPocket.BACKPORTS |
169 | + and not (pocket == PackagePublishingPocket.SECURITY and spr is None) |
170 | + and not is_auto_sync_upload( |
171 | + spr, bprs, pocket, changes['Changed-By'])): |
172 | from_addr = sanitize_string(changes['Changed-By']) |
173 | name = None |
174 | bcc_addr = None |
175 | @@ -230,11 +230,12 @@ |
176 | bcc_addr = '%s_derivatives@packages.qa.debian.org' % name |
177 | |
178 | build_and_send_mail( |
179 | - 'announcement', [str(announce_list)], from_addr, bcc_addr) |
180 | + 'announcement', [str(distroseries.changeslist)], from_addr, |
181 | + bcc_addr) |
182 | |
183 | |
184 | def assemble_body(blamer, spr, archive, distroseries, summary, changes, |
185 | - action, announce_list): |
186 | + action): |
187 | """Assemble the e-mail notification body.""" |
188 | information = { |
189 | 'STATUS': ACTION_DESCRIPTIONS[action], |
190 | @@ -262,8 +263,9 @@ |
191 | if action == 'unapproved': |
192 | information['SUMMARY'] += ( |
193 | "\nThis upload awaits approval by a distro manager\n") |
194 | - if announce_list: |
195 | - information['ANNOUNCE'] = "Announcing to %s" % announce_list |
196 | + if distroseries.changeslist: |
197 | + information['ANNOUNCE'] = "Announcing to %s" % ( |
198 | + distroseries.changeslist) |
199 | if blamer is not None: |
200 | signer_signature = '%s <%s>' % ( |
201 | blamer.displayname, blamer.preferredemail.email) |
202 | |
203 | === modified file 'lib/lp/soyuz/browser/queue.py' |
204 | --- lib/lp/soyuz/browser/queue.py 2010-08-25 11:00:07 +0000 |
205 | +++ lib/lp/soyuz/browser/queue.py 2011-06-02 09:53:33 +0000 |
206 | @@ -400,7 +400,7 @@ |
207 | |
208 | def queue_action_accept(self, queue_item): |
209 | """Reject the queue item passed.""" |
210 | - queue_item.acceptFromQueue(announce_list=self.context.changeslist) |
211 | + queue_item.acceptFromQueue() |
212 | |
213 | def queue_action_reject(self, queue_item): |
214 | """Accept the queue item passed.""" |
215 | |
216 | === modified file 'lib/lp/soyuz/doc/distroseriesqueue-notify.txt' |
217 | --- lib/lp/soyuz/doc/distroseriesqueue-notify.txt 2011-05-27 06:17:14 +0000 |
218 | +++ lib/lp/soyuz/doc/distroseriesqueue-notify.txt 2011-06-02 09:53:33 +0000 |
219 | @@ -43,7 +43,6 @@ |
220 | >>> changes_file = open(changes_file_path,'r') |
221 | >>> from lp.services.log.logger import FakeLogger |
222 | >>> netapplet_upload.notify( |
223 | - ... announce_list="announcelist@canonical.com", |
224 | ... changes_file_object=changes_file, logger=FakeLogger()) |
225 | DEBUG Building recipients list. |
226 | DEBUG Changes file is unsigned, adding changer as recipient |
227 | @@ -116,7 +115,6 @@ |
228 | >>> changes_file = open(changes_file_path,'r') |
229 | >>> netapplet_upload.setAccepted() |
230 | >>> netapplet_upload.notify( |
231 | - ... announce_list="announcelist@canonical.com", |
232 | ... changes_file_object=changes_file, logger=FakeLogger()) |
233 | DEBUG Building recipients list. |
234 | ... |
235 | @@ -124,7 +122,7 @@ |
236 | ... |
237 | DEBUG Recipients: Foo Bar <foo.bar@canonical.com>, Daniel Silverstone <daniel.silverstone@canonical.com> |
238 | ... |
239 | - DEBUG Announcing to announcelist@canonical.com |
240 | + DEBUG Announcing to autotest_changes@ubuntu.com |
241 | ... |
242 | DEBUG Sent a mail: |
243 | ... |
244 | @@ -137,10 +135,10 @@ |
245 | 2 |
246 | |
247 | The mail 'To:' addresses contain the signer and the changer's email. The |
248 | -announcement email contains the argument specified for "announce_list". |
249 | +announcement email contains the serieses changeslist. |
250 | |
251 | >>> [msg['To'] for msg in msgs] |
252 | - ['Foo Bar <foo.bar@canonical.com>,\n\tDaniel Silverstone <daniel.silverstone@canonical.com>', 'announcelist@canonical.com'] |
253 | + ['Foo Bar <foo.bar@canonical.com>,\n\tDaniel Silverstone <daniel.silverstone@canonical.com>', 'autotest_changes@ubuntu.com'] |
254 | |
255 | The mail 'Bcc:' address is the uploader. The announcement has the uploader |
256 | and the Debian derivatives address for the package uploaded. |
257 | @@ -185,8 +183,7 @@ |
258 | >>> fillLibrarianFile(1, content=changes_file.read()) |
259 | >>> changes_file.close() |
260 | >>> netapplet_upload.setNew() |
261 | - >>> netapplet_upload.notify(announce_list="announcelist@canonical.com", |
262 | - ... logger=FakeLogger()) |
263 | + >>> netapplet_upload.notify(logger=FakeLogger()) |
264 | DEBUG Building recipients list. |
265 | ... |
266 | DEBUG Sent a mail: |
267 | |
268 | === modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt' |
269 | --- lib/lp/soyuz/doc/distroseriesqueue.txt 2011-01-17 21:51:09 +0000 |
270 | +++ lib/lp/soyuz/doc/distroseriesqueue.txt 2011-06-02 09:53:33 +0000 |
271 | @@ -982,7 +982,7 @@ |
272 | >>> insertFakeChangesFile(items[1].changesfile.id) |
273 | >>> insertFakeChangesFile(items[3].changesfile.id) |
274 | >>> try: |
275 | - ... items[1].acceptFromQueue('announce@example.com') |
276 | + ... items[1].acceptFromQueue() |
277 | ... except QueueInconsistentStateError, e: |
278 | ... print 'FAILED' |
279 | ... else: |
280 | |
281 | === modified file 'lib/lp/soyuz/interfaces/queue.py' |
282 | --- lib/lp/soyuz/interfaces/queue.py 2011-05-25 08:16:52 +0000 |
283 | +++ lib/lp/soyuz/interfaces/queue.py 2011-06-02 09:53:33 +0000 |
284 | @@ -238,7 +238,7 @@ |
285 | has no sources associated to it. |
286 | """ |
287 | |
288 | - def acceptFromQueue(announce_list, logger=None, dry_run=False): |
289 | + def acceptFromQueue(logger=None, dry_run=False): |
290 | """Call setAccepted, do a syncUpdate, and send notification email. |
291 | |
292 | * Grant karma to people involved with the upload. |
293 | @@ -280,15 +280,12 @@ |
294 | committed to have some updates actually written to the database. |
295 | """ |
296 | |
297 | - def notify(announce_list=None, summary_text=None, |
298 | - changes_file_object=None, logger=None): |
299 | + def notify(summary_text=None, changes_file_object=None, logger=None): |
300 | """Notify by email when there is a new distroseriesqueue entry. |
301 | |
302 | This will send new, accept, announce and rejection messages as |
303 | appropriate. |
304 | |
305 | - :param announce_list: The email address of the distro announcements |
306 | - |
307 | :param summary_text: Any additional text to append to the auto- |
308 | generated summary. This is also the only text used if there is |
309 | a rejection message generated. |
310 | |
311 | === modified file 'lib/lp/soyuz/model/queue.py' |
312 | --- lib/lp/soyuz/model/queue.py 2011-05-27 07:29:08 +0000 |
313 | +++ lib/lp/soyuz/model/queue.py 2011-06-02 09:53:33 +0000 |
314 | @@ -392,7 +392,7 @@ |
315 | self._closeBugs(changesfile_path, logger) |
316 | self._giveKarma() |
317 | |
318 | - def acceptFromQueue(self, announce_list, logger=None, dry_run=False): |
319 | + def acceptFromQueue(self, logger=None, dry_run=False): |
320 | """See `IPackageUpload`.""" |
321 | assert not self.is_delayed_copy, 'Cannot process delayed copies.' |
322 | |
323 | @@ -402,7 +402,7 @@ |
324 | # is pulled from the librarian which are stripped of their |
325 | # signature just before being stored. |
326 | self.notify( |
327 | - announce_list=announce_list, logger=logger, dry_run=dry_run, |
328 | + logger=logger, dry_run=dry_run, |
329 | changes_file_object=changes_file_object) |
330 | self.syncUpdate() |
331 | |
332 | @@ -633,7 +633,6 @@ |
333 | changes_file_object = StringIO.StringIO( |
334 | changes_file.read()) |
335 | self.notify( |
336 | - announce_list=self.distroseries.changeslist, |
337 | changes_file_object=changes_file_object, |
338 | logger=logger) |
339 | self.syncUpdate() |
340 | @@ -683,8 +682,8 @@ |
341 | # and uploading to any archive as the signer. |
342 | return changes, strip_pgp_signature(changes_content).splitlines(True) |
343 | |
344 | - def notify(self, announce_list=None, summary_text=None, |
345 | - changes_file_object=None, logger=None, dry_run=False): |
346 | + def notify(self, summary_text=None, changes_file_object=None, |
347 | + logger=None, dry_run=False): |
348 | """See `IPackageUpload`.""" |
349 | status_action = { |
350 | PackageUploadStatus.NEW: 'new', |
351 | @@ -704,8 +703,8 @@ |
352 | signer = None |
353 | notify( |
354 | signer, self.sourcepackagerelease, self.builds, self.customfiles, |
355 | - self.archive, self.distroseries, self.pocket, announce_list, |
356 | - summary_text, changes, changesfile_content, changes_file_object, |
357 | + self.archive, self.distroseries, self.pocket, summary_text, |
358 | + changes, changesfile_content, changes_file_object, |
359 | status_action[self.status], dry_run, logger) |
360 | |
361 | def _isPersonUploader(self, person): |
362 | |
363 | === modified file 'lib/lp/soyuz/scripts/queue.py' |
364 | --- lib/lp/soyuz/scripts/queue.py 2010-09-27 20:47:58 +0000 |
365 | +++ lib/lp/soyuz/scripts/queue.py 2011-06-02 09:53:33 +0000 |
366 | @@ -79,8 +79,7 @@ |
367 | |
368 | def __init__(self, distribution_name, suite_name, queue, terms, |
369 | component_name, section_name, priority_name, |
370 | - announcelist, display, no_mail=True, exact_match=False, |
371 | - log=None): |
372 | + display, no_mail=True, exact_match=False, log=None): |
373 | """Initialises passed variables. """ |
374 | self.terms = terms |
375 | # Some actions have addtional commands at the start of the terms |
376 | @@ -94,7 +93,6 @@ |
377 | self.no_mail = no_mail |
378 | self.distribution_name = distribution_name |
379 | self.suite_name = suite_name |
380 | - self.announcelist = announcelist |
381 | self.default_sender = "%s <%s>" % ( |
382 | config.uploader.default_sender_name, |
383 | config.uploader.default_sender_address) |
384 | @@ -112,7 +110,7 @@ |
385 | pocket=self.pocket) |
386 | |
387 | def setDefaultContext(self): |
388 | - """Set default distribuiton, distroseries, announcelist.""" |
389 | + """Set default distribuiton, distroseries.""" |
390 | # if not found defaults to 'ubuntu' |
391 | |
392 | # Avoid circular imports. |
393 | @@ -140,9 +138,6 @@ |
394 | self.distroseries = self.distribution.currentseries |
395 | self.pocket = PackagePublishingPocket.RELEASE |
396 | |
397 | - if not self.announcelist: |
398 | - self.announcelist = self.distroseries.changeslist |
399 | - |
400 | def initialize(self): |
401 | """Builds a list of affected records based on the filter argument.""" |
402 | self.setDefaultContext() |
403 | @@ -483,8 +478,7 @@ |
404 | self.display('Accepting %s' % queue_item.displayname) |
405 | try: |
406 | queue_item.acceptFromQueue( |
407 | - announce_list=self.announcelist, logger=self.log, |
408 | - dry_run=self.no_mail) |
409 | + logger=self.log, dry_run=self.no_mail) |
410 | except QueueInconsistentStateError, info: |
411 | self.display('** %s could not be accepted due to %s' |
412 | % (queue_item.displayname, info)) |
413 | @@ -522,8 +516,7 @@ |
414 | |
415 | def __init__(self, distribution_name, suite_name, queue, terms, |
416 | component_name, section_name, priority_name, |
417 | - announcelist, display, no_mail=True, exact_match=False, |
418 | - log=None): |
419 | + display, no_mail=True, exact_match=False, log=None): |
420 | """Constructor for QueueActionOverride.""" |
421 | |
422 | # This exists so that self.terms_start_index can be set as this action |
423 | @@ -532,8 +525,8 @@ |
424 | # over-ride. |
425 | QueueAction.__init__(self, distribution_name, suite_name, queue, |
426 | terms, component_name, section_name, |
427 | - priority_name, announcelist, display, |
428 | - no_mail=True, exact_match=False, log=log) |
429 | + priority_name, display, no_mail=True, |
430 | + exact_match=False, log=log) |
431 | self.terms_start_index = 1 |
432 | self.overrides_performed = 0 |
433 | |
434 | @@ -665,12 +658,11 @@ |
435 | """A wrapper for queue_action classes.""" |
436 | |
437 | def __init__(self, queue, distribution_name, suite_name, |
438 | - announcelist, no_mail, component_name, section_name, |
439 | - priority_name, display=default_display, log=None): |
440 | + no_mail, component_name, section_name, priority_name, |
441 | + display=default_display, log=None): |
442 | self.queue = queue |
443 | self.distribution_name = distribution_name |
444 | self.suite_name = suite_name |
445 | - self.announcelist = announcelist |
446 | self.no_mail = no_mail |
447 | self.component_name = component_name |
448 | self.section_name = section_name |
449 | @@ -701,7 +693,6 @@ |
450 | queue_action = queue_action_class( |
451 | distribution_name=self.distribution_name, |
452 | suite_name=self.suite_name, |
453 | - announcelist=self.announcelist, |
454 | queue=self.queue, |
455 | no_mail=self.no_mail, |
456 | display=self.display, |
457 | |
458 | === modified file 'lib/lp/soyuz/scripts/tests/test_queue.py' |
459 | --- lib/lp/soyuz/scripts/tests/test_queue.py 2011-01-17 21:51:09 +0000 |
460 | +++ lib/lp/soyuz/scripts/tests/test_queue.py 2011-06-02 09:53:33 +0000 |
461 | @@ -91,10 +91,9 @@ |
462 | self.test_output.append(text) |
463 | |
464 | def execute_command(self, argument, queue_name='new', no_mail=True, |
465 | - distribution_name='ubuntu',announcelist=None, |
466 | - component_name=None, section_name=None, |
467 | - priority_name=None, suite_name='breezy-autotest', |
468 | - quiet=True): |
469 | + distribution_name='ubuntu', component_name=None, |
470 | + section_name=None, priority_name=None, |
471 | + suite_name='breezy-autotest', quiet=True): |
472 | """Helper method to execute a queue command. |
473 | |
474 | Initialise output buffer and execute a command according |
475 | @@ -105,7 +104,7 @@ |
476 | self.test_output = [] |
477 | queue = name_queue_map[queue_name] |
478 | runner = CommandRunner( |
479 | - queue, distribution_name, suite_name, announcelist, no_mail, |
480 | + queue, distribution_name, suite_name, no_mail, |
481 | component_name, section_name, priority_name, |
482 | display=self._test_display) |
483 | |
484 | |
485 | === modified file 'lib/lp/soyuz/tests/test_packageupload.py' |
486 | --- lib/lp/soyuz/tests/test_packageupload.py 2011-05-25 07:09:27 +0000 |
487 | +++ lib/lp/soyuz/tests/test_packageupload.py 2011-06-02 09:53:33 +0000 |
488 | @@ -63,8 +63,7 @@ |
489 | delayed_copy = self.createEmptyDelayedCopy() |
490 | self.assertRaisesWithContent( |
491 | AssertionError, |
492 | - 'Cannot process delayed copies.', |
493 | - delayed_copy.acceptFromQueue, 'some-announce-list') |
494 | + 'Cannot process delayed copies.', delayed_copy.acceptFromQueue) |
495 | |
496 | def test_acceptFromCopy_refuses_empty_copies(self): |
497 | # Empty delayed-copies cannot be accepted. |
498 | |
499 | === modified file 'scripts/ftpmaster-tools/queue' |
500 | --- scripts/ftpmaster-tools/queue 2010-04-27 19:48:39 +0000 |
501 | +++ scripts/ftpmaster-tools/queue 2011-06-02 09:53:33 +0000 |
502 | @@ -59,12 +59,6 @@ |
503 | default=False, |
504 | help="Ignore errors when performing a list of commands.") |
505 | |
506 | - parser.add_option("-A", "--announcelist", |
507 | - dest="announcelist", metavar="ANNOUNCELIST", |
508 | - default=None, |
509 | - help=("Overrides the announcement list for accepts, " |
510 | - "defaults to the distribution 'changeslist'")) |
511 | - |
512 | parser.add_option("-f", "--file", metavar="FILE", default=None, |
513 | help="file containing a sequence of command lines.") |
514 | |
515 | @@ -98,8 +92,8 @@ |
516 | |
517 | cmd_runner = CommandRunner( |
518 | queue, options.distribution_name, options.suite_name, |
519 | - options.announcelist, no_mail, options.component_name, |
520 | - options.section_name, options.priority_name, log=log) |
521 | + no_mail, options.component_name, options.section_name, |
522 | + options.priority_name, log=log) |
523 | |
524 | print ("Initialising connection to queue %s" % options.queue_name) |
525 |
133 + if (action == 'accepted' and distroseries. changeslist and ngPocket. BACKPORTS ngPocket. SECURITY and spr is None) sync_upload( 'Changed- By'])):
134 + not archive.is_ppa and pocket != PackagePublishi
135 + and not (pocket == PackagePublishi
136 + and not is_auto_
137 + spr, bprs, pocket, changes[
The ands were consistently at the end of each line. Either is OK, but not both at once please.