Merge lp:~ajmitch/launchpad/fakesyncs into lp:launchpad

Proposed by Andrew Mitchell
Status: Rejected
Rejected by: Māris Fogels
Proposed branch: lp:~ajmitch/launchpad/fakesyncs
Merge into: lp:launchpad
Diff against target: 30 lines (+14/-6)
1 file modified
scripts/ftpmaster-tools/sync-source.py (+14/-6)
To merge this branch: bzr merge lp:~ajmitch/launchpad/fakesyncs
Reviewer Review Type Date Requested Status
Māris Fogels (community) Needs Information
Julian Edwards Pending
Review via email: mp+27615@code.launchpad.net

Description of the change

Summary:
Packages that have been uploaded to Ubuntu & then subsequently uploaded to Debian with a different orig.tar.gz cannot be synced, and a convention is to 'fakesync' these packages with a -XbuildY or XubuntuY revision. Using the former means that sync-source.py will fail at importing them, and the latter means that they will not be automatically synced when a new upstream version is released.

Proposed fix:
This branch adds a special case for packages with a version string containing 'fakesync', such that it will not sync the package if the Ubuntu & Debian upstream versions are the same, and the version contains fakesync

To post a comment you must log in.
Revision history for this message
Māris Fogels (mars) wrote :

Hi Andrew,

The branch structure is really difficult to follow. Before landing this I think you have to make absolutely sure that no execution paths have changed. The fact that these scripts often don't have tests does not help the matter: we have to lean even more on code inspection.

Did you have a pre-implementation call with anyone? And are there any tests that can be run to verify the change?

Maris

review: Needs Information
Revision history for this message
Andrew Mitchell (ajmitch) wrote :

Having read a thread which I've dug up about this subject ( http://thread.gmane.org/gmane.linux.ubuntu.devel/30305/focus=30318 ), I'm not convinced that the proposed merge, which introduces a new special-case in the version handling, is the best way I could do this. I'll take a look at the possibility of checking the md5sums of the original tarballs instead of checking the version.

Unmerged revisions

10992. By Andrew Mitchell

Refuse to try & sync packages with fakesync in the version when they have the same upstream version

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/ftpmaster-tools/sync-source.py'
2--- scripts/ftpmaster-tools/sync-source.py 2010-05-19 18:07:56 +0000
3+++ scripts/ftpmaster-tools/sync-source.py 2010-06-15 11:34:39 +0000
4@@ -698,12 +698,20 @@
5 source_version = Sources[pkg]["version"]
6 if (dest_version is None
7 or apt_pkg.VersionCompare(dest_version, source_version) < 0):
8- if (dest_version is not None
9- and (not Options.force
10- and dest_version.find("ubuntu") != -1)):
11- stat_cant_update += 1
12- print ("[NOT Updating - Modified] %s_%s (vs %s)"
13- % (pkg, dest_version, source_version))
14+ if dest_version is not None:
15+ if (not Options.force
16+ and dest_version.find("ubuntu") != -1):
17+ stat_cant_update += 1
18+ print ("[NOT Updating - Modified] %s_%s (vs %s)"
19+ % (pkg, dest_version, source_version))
20+ elif (not Options.force
21+ and dest_version.find("fakesync") != -1
22+ and (apt_pkg.upstream_version(dest_version) ==
23+ apt_pkg.upstream_version(source_version))):
24+ # fakesyncs cannot sync if upstream versions are the same
25+ stat_cant_update += 1
26+ print ("[NOT Updating - Fakesync] %s_%s (vs %s)"
27+ % (pkg, dest_version, source_version))
28 else:
29 stat_updated += 1
30 print ("[Updating] %s (%s [Ubuntu] < %s [%s])"