Merge lp:~sil2100/ubuntu-archive-tools/sru-review-check-uploads into lp:~vorlon/ubuntu-archive-tools/kernel-sru-review

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 1081
Proposed branch: lp:~sil2100/ubuntu-archive-tools/sru-review-check-uploads
Merge into: lp:~vorlon/ubuntu-archive-tools/kernel-sru-review
Diff against target: 24 lines (+14/-0)
1 file modified
kernel-sru-review (+14/-0)
To merge this branch: bzr merge lp:~sil2100/ubuntu-archive-tools/sru-review-check-uploads
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+313717@code.launchpad.net

Commit message

Make sure to check both the archive and the UNAPPROVED queue to see if the given package hasn't been handled already. Skip it if it has.

Description of the change

Make sure to check both the archive and the UNAPPROVED queue to see if the given package hasn't been handled already. Skip it if it has.

To post a comment you must log in.
1082. By Łukasz Zemczak

Change the warning string slightly.

1083. By Łukasz Zemczak

As per Steve's recommendation, we need to check all queues - excluding the Rejected queue. Also, uh, not sure how the hard-coded source name ended up here...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'kernel-sru-review'
2--- kernel-sru-review 2016-12-21 03:35:20 +0000
3+++ kernel-sru-review 2016-12-21 16:50:46 +0000
4@@ -75,6 +75,20 @@
5 ppa_dsc = list(filter(
6 lambda x: x.endswith('.dsc'), ppa_src.sourceFileUrls()))[0]
7
8+ if ppa_ver == source_ver:
9+ print("%s already latest in destination archive (%s), skipping" %
10+ (source, ppa_ver))
11+ return
12+
13+ queue_uploads = series.getPackageUploads(version=ppa_ver,
14+ name=source,
15+ exact_match=True)
16+ for upload in queue_uploads:
17+ if upload.status != 'Rejected':
18+ print("%s already latest in the %s queue (%s), skipping" %
19+ (source, upload.status, ppa_ver))
20+ return
21+
22 new_fullabi = ppa_ver.split('~')[0]
23 new_majorabi = re.sub(r"\.[^.]+$", '', new_fullabi)
24 new_upstream = new_fullabi.split('-')[0]

Subscribers

People subscribed via source and target branches