Merge lp:~brian-murray/ubuntu-archive-tools/no-deleted into lp:ubuntu-archive-tools

Proposed by Brian Murray
Status: Merged
Merged at revision: 938
Proposed branch: lp:~brian-murray/ubuntu-archive-tools/no-deleted
Merge into: lp:ubuntu-archive-tools
Diff against target: 54 lines (+15/-9)
1 file modified
sru-report (+15/-9)
To merge this branch: bzr merge lp:~brian-murray/ubuntu-archive-tools/no-deleted
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+250811@code.launchpad.net

Description of the change

In the pending SRU report we see the following line:

cups 1.7.2-0ubuntu1 1.7.2-0ubuntu1.2 1.7.2-0ubuntu1.4 #1352809 #1386241 12

However, bug 1386241 was fixed in version 1.7.2-0ubuntu1.3 which was then deleted from -proposed and really shouldn't appear in the report. It is appearing because we look at the changelogs for each version between 1.2 and 1.4, but we really should not look at changelog for 1.3 since it was deleted. This fixes that.

To post a comment you must log in.
938. By Brian Murray

sru-report: speed things up a bit by caching launchpad api items used multiple times.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sru-report'
--- sru-report 2015-02-20 17:42:16 +0000
+++ sru-report 2015-02-24 22:42:10 +0000
@@ -90,26 +90,31 @@
90 base_version = None90 base_version = None
91 base_created = None91 base_created = None
92 for pub in pubs:92 for pub in pubs:
93 p_srcpkg_version = pub.source_package_version
94 p_date_pub = pub.date_published
95 p_pocket = pub.pocket
93 if pub.pocket in ('Release', 'Updates'):96 if pub.pocket in ('Release', 'Updates'):
94 if (base_version is None or97 if (base_version is None or
95 apt_pkg.version_compare(98 apt_pkg.version_compare(
96 base_version, pub.source_package_version) < 0):99 base_version, p_srcpkg_version) < 0):
97 base_version = pub.source_package_version100 base_version = p_srcpkg_version
98 base_created = pub.date_created101 base_created = pub.date_created
99 elif pub.pocket == 'Proposed':102 elif p_pocket == 'Proposed':
100 history['changesfiles'].append(pub.changesFileUrl())103 history['changesfiles'].append(pub.changesFileUrl())
101 history['published'] = pub.date_published104 history['published'] = p_date_pub
102 logging.debug(105 logging.debug(
103 '%s=%s published to %s/%s on %s' %106 '%s=%s published to %s/%s on %s' %
104 (sourcename, pub.source_package_version,107 (sourcename, p_srcpkg_version,
105 distro_series.name, pub.pocket, pub.date_published))108 distro_series.name, p_pocket, p_date_pub))
106 history[pub.pocket.lower()] = pub.source_package_version109 history[p_pocket.lower()] = p_srcpkg_version
107 if base_version is not None:110 if base_version is not None:
108 proposed = archive.getPublishedSources(111 proposed = archive.getPublishedSources(
109 source_name=sourcename, exact_match=True,112 source_name=sourcename, exact_match=True,
110 distro_series=distro_series, pocket='Proposed',113 distro_series=distro_series, pocket='Proposed',
111 created_since_date=base_created)114 created_since_date=base_created)
112 for pub in proposed:115 for pub in proposed:
116 if pub.status == 'Deleted':
117 continue
113 if apt_pkg.version_compare(118 if apt_pkg.version_compare(
114 base_version, pub.source_package_version) >= 0:119 base_version, pub.source_package_version) >= 0:
115 continue120 continue
@@ -680,9 +685,10 @@
680 source_name=published.source_package_name,685 source_name=published.source_package_name,
681 exact_match=True, status='Published',686 exact_match=True, status='Published',
682 distro_series=releases[release]):687 distro_series=releases[release]):
688 up_srcpkg_version = ubuntu_pub.source_package_version
683 if apt_pkg.version_compare(689 if apt_pkg.version_compare(
684 latest_ubuntu, ubuntu_pub.source_package_version) < 0:690 latest_ubuntu, up_srcpkg_version) < 0:
685 latest_ubuntu = ubuntu_pub.source_package_version691 latest_ubuntu = up_srcpkg_version
686692
687 logging.debug(' Ubuntu has version %s', latest_ubuntu)693 logging.debug(' Ubuntu has version %s', latest_ubuntu)
688694

Subscribers

People subscribed via source and target branches