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
1=== modified file 'sru-report'
2--- sru-report 2015-02-20 17:42:16 +0000
3+++ sru-report 2015-02-24 22:42:10 +0000
4@@ -90,26 +90,31 @@
5 base_version = None
6 base_created = None
7 for pub in pubs:
8+ p_srcpkg_version = pub.source_package_version
9+ p_date_pub = pub.date_published
10+ p_pocket = pub.pocket
11 if pub.pocket in ('Release', 'Updates'):
12 if (base_version is None or
13 apt_pkg.version_compare(
14- base_version, pub.source_package_version) < 0):
15- base_version = pub.source_package_version
16+ base_version, p_srcpkg_version) < 0):
17+ base_version = p_srcpkg_version
18 base_created = pub.date_created
19- elif pub.pocket == 'Proposed':
20+ elif p_pocket == 'Proposed':
21 history['changesfiles'].append(pub.changesFileUrl())
22- history['published'] = pub.date_published
23+ history['published'] = p_date_pub
24 logging.debug(
25 '%s=%s published to %s/%s on %s' %
26- (sourcename, pub.source_package_version,
27- distro_series.name, pub.pocket, pub.date_published))
28- history[pub.pocket.lower()] = pub.source_package_version
29+ (sourcename, p_srcpkg_version,
30+ distro_series.name, p_pocket, p_date_pub))
31+ history[p_pocket.lower()] = p_srcpkg_version
32 if base_version is not None:
33 proposed = archive.getPublishedSources(
34 source_name=sourcename, exact_match=True,
35 distro_series=distro_series, pocket='Proposed',
36 created_since_date=base_created)
37 for pub in proposed:
38+ if pub.status == 'Deleted':
39+ continue
40 if apt_pkg.version_compare(
41 base_version, pub.source_package_version) >= 0:
42 continue
43@@ -680,9 +685,10 @@
44 source_name=published.source_package_name,
45 exact_match=True, status='Published',
46 distro_series=releases[release]):
47+ up_srcpkg_version = ubuntu_pub.source_package_version
48 if apt_pkg.version_compare(
49- latest_ubuntu, ubuntu_pub.source_package_version) < 0:
50- latest_ubuntu = ubuntu_pub.source_package_version
51+ latest_ubuntu, up_srcpkg_version) < 0:
52+ latest_ubuntu = up_srcpkg_version
53
54 logging.debug(' Ubuntu has version %s', latest_ubuntu)
55

Subscribers

People subscribed via source and target branches