Merge lp:~wgrant/launchpad/sync-source-v3-fix into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Merged at revision: not available
Proposed branch: lp:~wgrant/launchpad/sync-source-v3-fix
Merge into: lp:launchpad/db-devel
Diff against target: 11 lines
1 file modified
scripts/ftpmaster-tools/dak_utils.py (+1/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/sync-source-v3-fix
Reviewer Review Type Date Requested Status
Michael Nelson (community) release-critical Approve
Julian Edwards (community) code Approve
Review via email: mp+14417@code.launchpad.net
To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

Since Debian now has many v3 source packages, bug #474163 is going to crash the autosyncer and make archive admins very unhappy.

My suggested fix is to just float() the first space-separated part. I could have instead moved the format check inside the "if not is_a_dsc" block, but splitting seems like a sane enough approach for .changes files as well.

I've tested sync-source.py (the only user of this code) with all three formats, and it works fine.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Looks fine, thanks for doing this William.

review: Approve (code)
Revision history for this message
Michael Nelson (michael.nelson) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/ftpmaster-tools/dak_utils.py'
2--- scripts/ftpmaster-tools/dak_utils.py 2007-08-04 15:40:41 +0000
3+++ scripts/ftpmaster-tools/dak_utils.py 2009-11-04 13:20:31 +0000
4@@ -154,7 +154,7 @@
5 # Make sure we recognise the format of the Files: field
6 format = changes.get("format", "");
7 if format != "":
8- format = float(format);
9+ format = float(format.split()[0]);
10 if not is_a_dsc and (format < 1.5 or format > 2.0):
11 raise nk_format_exc, format;
12

Subscribers

People subscribed via source and target branches

to status/vote changes: