Merge ~brian-murray/ubuntu-archive-tools:sru-review-updates into ubuntu-archive-tools:main

Proposed by Brian Murray
Status: Merged
Merged at revision: ca42e57d487ac75fd671f9d5150aa825b25101a0
Proposed branch: ~brian-murray/ubuntu-archive-tools:sru-review-updates
Merge into: ubuntu-archive-tools:main
Diff against target: 47 lines (+15/-8)
1 file modified
sru-review (+15/-8)
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Review via email: mp+417832@code.launchpad.net

Description of the change

sru-review is supposed to check if a there is an existing SRU of a package in -proposed and while it did that what it did not do was properly check to see if that package was copied to -updates. This fixes that by checking for the same version of the package in the -updates pocket as is in the -proposed pocket. (The old way never would have worked as the source package publishing history records are different.)

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, code-wise it looks good. The only thing I would be worried about if not all the variable references were updated after the variable renaming. Otherwise, please go ahead!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/sru-review b/sru-review
index 600a74a..d644eef 100755
--- a/sru-review
+++ b/sru-review
@@ -364,19 +364,26 @@ if __name__ == '__main__':
364 (upload, changes_url, debdiff) = from_queue(364 (upload, changes_url, debdiff) = from_queue(
365 opts, archive, sourcepkg, series, version)365 opts, archive, sourcepkg, series, version)
366366
367 # Check for existing version in proposed367 # Check to see if there is an existing SRU of the package in -proposed
368 # and also check that it has not been copied to -updates yet.
368 if series != ubuntu.current_series:369 if series != ubuntu.current_series:
370 # need the spph so we have access to the package name, version and
371 # changes_url
369 existing = [372 existing = [
370 pkg for pkg in archive.getPublishedSources(373 spph for spph in archive.getPublishedSources(
371 exact_match=True, distro_series=series, pocket='Proposed',374 exact_match=True, distro_series=series, pocket='Proposed',
372 source_name=sourcepkg, status='Published')]375 source_name=sourcepkg, status='Published')]
373 updates = [376 # only the package name and version are needed for the check
374 pkg for pkg in archive.getPublishedSources(377 updates_details = [
378 (spph.source_package_name, spph.source_package_version)
379 for spph in archive.getPublishedSources(
375 exact_match=True, distro_series=series, pocket='Updates',380 exact_match=True, distro_series=series, pocket='Updates',
376 source_name=sourcepkg, status='Published')]381 source_name=sourcepkg, status='Published')]
377 for pkg in existing:382 for spph in existing:
378 if pkg not in updates:383 pkg_name = spph.source_package_name
379 changesfile_url = pkg.changesFileUrl()384 pkg_vers = spph.source_package_version
385 if (pkg_name, pkg_vers) not in updates_details:
386 changesfile_url = spph.changesFileUrl()
380 changes = parse_changes(changesfile_url)387 changes = parse_changes(changesfile_url)
381 msg = ('''\388 msg = ('''\
382*******************************************************389*******************************************************
@@ -385,7 +392,7 @@ if __name__ == '__main__':
385* SRU Bug: LP: #%s392* SRU Bug: LP: #%s
386*393*
387*******************************************************''' %394*******************************************************''' %
388 (sourcepkg, pkg.source_package_version,395 (sourcepkg, pkg_vers,
389 ' LP: #'.join(changes['bugs'])))396 ' LP: #'.join(changes['bugs'])))
390 print(msg, file=sys.stderr)397 print(msg, file=sys.stderr)
391 print('''View the debdiff anyway? [yN]''', end="")398 print('''View the debdiff anyway? [yN]''', end="")

Subscribers

People subscribed via source and target branches