launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26413
[Merge] ~cjwatson/launchpad:py3-stable-deb-timestamp-errors into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-stable-deb-timestamp-errors into launchpad:master.
Commit message:
Stabilize ordering of reported .deb timestamp errors
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/398636
For test stability we want to pick a deterministic entry from the list, so make sure we remember the order in which we encountered timestamp errors.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-stable-deb-timestamp-errors into launchpad:master.
diff --git a/lib/lp/archiveuploader/nascentuploadfile.py b/lib/lp/archiveuploader/nascentuploadfile.py
index 48f079d..7183c9a 100644
--- a/lib/lp/archiveuploader/nascentuploadfile.py
+++ b/lib/lp/archiveuploader/nascentuploadfile.py
@@ -17,6 +17,7 @@ __all__ = [
'splitComponentAndSection',
]
+from collections import OrderedDict
import hashlib
import os
import subprocess
@@ -85,8 +86,8 @@ class TarFileDateChecker:
def reset(self):
"""Reset local values."""
- self.future_files = {}
- self.ancient_files = {}
+ self.future_files = OrderedDict()
+ self.ancient_files = OrderedDict()
def callback(self, member, data):
"""Callback designed to cope with apt_inst.TarFile.go.
diff --git a/lib/lp/archiveuploader/tests/nascentuploadfile.txt b/lib/lp/archiveuploader/tests/nascentuploadfile.txt
index 7af20da..60ea018 100644
--- a/lib/lp/archiveuploader/tests/nascentuploadfile.txt
+++ b/lib/lp/archiveuploader/tests/nascentuploadfile.txt
@@ -516,7 +516,7 @@ being too new:
>>> list(ed_binary_deb.verifyDebTimestamp())
[UploadError(...'ed_0.2-20_i386.deb:
has 26 file(s) with a time stamp too far into the future
- (e.g. control [Thu Jan 3 19:29:01 2008]).',)]
+ (e.g. ./ [Thu Jan 3 19:29:00 2008]).',)]
... as well as for being too old:
@@ -531,4 +531,4 @@ being too new:
>>> list(ed_binary_deb.verify())
[UploadError(...'ed_0.2-20_i386.deb:
has 26 file(s) with a time stamp too far in the past
- (e.g. control [Thu Jan 3 19:29:01 2008]).',)]
+ (e.g. ./ [Thu Jan 3 19:29:00 2008]).',)]