Merge lp:~james-page/ubuntu-reports/ca-cloud-fix into lp:ubuntu-reports

Proposed by James Page
Status: Merged
Approved by: Adam Gandelman
Approved revision: 102
Merged at revision: 101
Proposed branch: lp:~james-page/ubuntu-reports/ca-cloud-fix
Merge into: lp:ubuntu-reports
Diff against target: 26 lines (+3/-3)
1 file modified
server/cloud-archive/version-tracker/ca-versions.py (+3/-3)
To merge this branch: bzr merge lp:~james-page/ubuntu-reports/ca-cloud-fix
Reviewer Review Type Date Requested Status
Adam Gandelman (community) Needs Fixing
Review via email: mp+161382@code.launchpad.net

Description of the change

This fix ensures that if multiple ~cloudX uploads are made to the
Ubuntu Cloud archive then the version checks still work.

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

'cloud0' is also hard-coded in render_table() and needs to be similarly updated there, as well, so that the html output compares version correctly, too.

review: Needs Fixing
102. By James Page

Fixup cloud0 -> cloud

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'server/cloud-archive/version-tracker/ca-versions.py'
--- server/cloud-archive/version-tracker/ca-versions.py 2012-12-07 21:45:15 +0000
+++ server/cloud-archive/version-tracker/ca-versions.py 2013-04-30 15:47:27 +0000
@@ -107,11 +107,11 @@
107 # set cells green if they contain the most recent version.107 # set cells green if they contain the most recent version.
108 newest_vers = _newest_vers([c['version'] for c in row])108 newest_vers = _newest_vers([c['version'] for c in row])
109 for c in row:109 for c in row:
110 # strip the ~cloud0 tag so we can just use native python comparison110 # strip the ~cloud tag so we can just use native python comparison
111 # here.111 # here.
112 if not c['version']:112 if not c['version']:
113 c['color'] = OLD_COLOR113 c['color'] = OLD_COLOR
114 elif c['version'].split("~cloud0")[0] == newest_vers.split("~cloud0")[0]:114 elif c['version'].split("~cloud")[0] == newest_vers.split("~cloud")[0]:
115 c['color'] = NEW_COLOR115 c['color'] = NEW_COLOR
116 else:116 else:
117 c['color'] = OLD_COLOR117 c['color'] = OLD_COLOR
@@ -161,7 +161,7 @@
161161
162 out = ''162 out = ''
163 for package in staging:163 for package in staging:
164 s_vers = staging[package].split('~cloud0')[0]164 s_vers = staging[package].split('~cloud')[0]
165 u_vers = ubuntu[package]165 u_vers = ubuntu[package]
166 if _dpkg_comp_pkg(u_vers, s_vers):166 if _dpkg_comp_pkg(u_vers, s_vers):
167 out += '%s:\n' % package167 out += '%s:\n' % package

Subscribers

People subscribed via source and target branches