Merge lp:~cjwatson/launchpad/contents-nanoseconds into lp:launchpad
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | no longer in the source branch. |
Merged at revision: | 17410 |
Proposed branch: | lp:~cjwatson/launchpad/contents-nanoseconds |
Merge into: | lp:launchpad |
Diff against target: |
63 lines (+35/-0) 2 files modified
lib/lp/archivepublisher/scripts/publish_ftpmaster.py (+9/-0) lib/lp/archivepublisher/tests/test_publish_ftpmaster.py (+26/-0) |
To merge this branch: | bzr merge lp:~cjwatson/launchpad/contents-nanoseconds |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+253678@code.launchpad.net |
Commit message
Work around Python bug that loses nanosecond precision in Contents file timestamps, causing them to be re-updated every time.
Description of the change
The saga continues ...
I just noticed that the publisher is updating lots of Contents files on every run, which on closer investigation turns out to be because Python's os.utime truncates the timestamp to microsecond resolution, causing the copied file to appear older (fixed in Python 3.3, but we won't be on that for quite some time). This works around that bug by rounding the timestamp up to the nearest second.
To post a comment you must log in.