launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17552
[Merge] lp:~cjwatson/launchpad/remove-old-ftparchive-compat into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-old-ftparchive-compat into lp:launchpad.
Commit message:
Remove support for apt-ftparchive from old Ubuntu versions.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #563503 in Launchpad itself: "Remove testsuite bodges re apt-ftparchive output changes once lpnet & pqm & developers all on lucid"
https://bugs.launchpad.net/launchpad/+bug/563503
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-old-ftparchive-compat/+merge/242679
LP is on >= precise now, so we can get rid of test workarounds for elderly versions of apt-ftparchive.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-old-ftparchive-compat into lp:launchpad.
=== modified file 'lib/lp/archivepublisher/tests/apt-data/Packages'
--- lib/lp/archivepublisher/tests/apt-data/Packages 2013-09-30 01:08:01 +0000
+++ lib/lp/archivepublisher/tests/apt-data/Packages 2014-11-24 16:22:42 +0000
@@ -10,6 +10,7 @@
MD5sum: 390074949d9533c4cf6774b9891306d0
SHA1: 1beb6c7f6be8d5b9d86335a0a939b1b49aec9aa9
SHA256: d652be5856066b3f5bb8df43e43199ee480aa65a1ccf8e78be4178a824c493ce
+SHA512: 51a3a466a70bb447b1dd2cecd35ff9184ce89f8785d6783dae286d7e03ce8cd4bb72af0a61c294469e683e003ecb4c833ab45ed98102ad8020d9f9dc7ac82909
Description: A tiny test package.
Doesn't really do anything at all.
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
=== modified file 'lib/lp/archivepublisher/tests/apt-data/Sources'
--- lib/lp/archivepublisher/tests/apt-data/Sources 2013-09-30 01:08:01 +0000
+++ lib/lp/archivepublisher/tests/apt-data/Sources 2014-11-24 16:22:42 +0000
@@ -14,4 +14,13 @@
63a97b775d908be8426e8891e582f1c2 485 tiny_0.1.tar.gz
Package-List:
tiny deb devel extra
+Checksums-Sha1:
+ 0528aa847dfd802bc788320f906f846b4931b840 444 tiny_0.1.dsc
+ d19603504f4c5c347dd6871d03bf232c7d54516a 485 tiny_0.1.tar.gz
+Checksums-Sha256:
+ 4b21ba373193932f1e72359d765fe26f2c991f25a0ec3ad72d209a5fe81823f3 444 tiny_0.1.dsc
+ 8a4a42063805dc1f9ee52b201b58da7c4aa594d6ad916673827320458bf0d9b2 485 tiny_0.1.tar.gz
+Checksums-Sha512:
+ 9ec0fb83923f67e7a55fde5b1bc323e950cdf710e676d5b69486e8c3b1afe63b137e7f7bdcdd2e10f080d75de40cff162857dfafb455e23ccfd52c4b1a1c7f5e 444 tiny_0.1.dsc
+ 7c1502d6709c2dbed18fa7ab6cf485321c46f44467745101ef1230413840378dadfb8f361d72a1df12d927308a77938914b166921e77258c3d3471c4650aa9b1 485 tiny_0.1.tar.gz
=== modified file 'lib/lp/archivepublisher/tests/test_ftparchive.py'
--- lib/lp/archivepublisher/tests/test_ftparchive.py 2014-01-17 03:21:05 +0000
+++ lib/lp/archivepublisher/tests/test_ftparchive.py 2014-11-24 16:22:42 +0000
@@ -43,18 +43,6 @@
)
-def sanitize_apt_ftparchive_Sources_output(text):
- # XXX: maxb 2010-04-15 bug=563503: Filter Checksums-* stanzas out of
- # apt-ftparchive Sources file content, such that the output of lucid
- # apt-ftparchive is the same as on karmic.
- return re.subn(r'(?sm)^Checksums-.*?(?=^[^ ])', '', text)[0]
-
-
-def skip_sha512(text):
- """Ignore SHA512 lines, which are present only in newer distroseries."""
- return re.sub('SHA512: [0-9a-f]*\n', '', text)
-
-
class SamplePublisher:
"""Publisher emulation test class."""
@@ -110,15 +98,13 @@
super(TestFTPArchive, self).tearDown()
shutil.rmtree(self._config.distroroot)
- def _verifyFile(self, filename, directory, output_filter=None):
+ def _verifyFile(self, filename, directory):
"""Compare byte-to-byte the given file and the respective sample.
It's a poor way of testing files generated by apt-ftparchive.
"""
result_path = os.path.join(directory, filename)
result_text = open(result_path).read()
- if output_filter is not None:
- result_text = output_filter(result_text)
sample_path = os.path.join(self._sampledir, filename)
sample_text = open(sample_path).read()
# When the comparison between the sample text and the generated text
@@ -451,15 +437,13 @@
# regressions.
fa.runApt(apt_conf)
self._verifyFile("Packages",
- os.path.join(self._distsdir, "hoary-test", "main", "binary-i386"),
- skip_sha512)
+ os.path.join(self._distsdir, "hoary-test", "main", "binary-i386"))
self._verifyEmpty(
os.path.join(
self._distsdir, "hoary-test", "main", "debian-installer",
"binary-i386", "Packages"))
self._verifyFile("Sources",
- os.path.join(self._distsdir, "hoary-test", "main", "source"),
- sanitize_apt_ftparchive_Sources_output)
+ os.path.join(self._distsdir, "hoary-test", "main", "source"))
# XXX cprov 2007-03-21: see above, byte-to-byte configuration
# comparing is weak.
=== modified file 'lib/lp/soyuz/doc/soyuz-upload.txt'
--- lib/lp/soyuz/doc/soyuz-upload.txt 2014-08-05 10:34:11 +0000
+++ lib/lp/soyuz/doc/soyuz-upload.txt 2014-11-24 16:22:42 +0000
@@ -467,8 +467,6 @@
>>> sources = open(
... "/var/tmp/archive/ubuntutest/dists/breezy-autotest/universe/source"
... "/Sources").read()
- >>> import re
- >>> sources = re.subn(r'(?sm)^Checksums-.*?(?=^[^ ])', '', sources)[0]
>>> print sources + '\nEND'
Package: etherwake
Binary: etherwake
@@ -484,14 +482,22 @@
f13711c5b8261fbb77b43ae0e8ba9360 566 etherwake_1.08-1.dsc
c2dc10f98bac012b900fd0b46721fc80 4455 etherwake_1.08.orig.tar.gz
95c1e89e3ad7bc8740793bdf7aeb7334 4145 etherwake_1.08-1.diff.gz
+ Checksums-Sha1:
+ 2ddcdc87ab3dc35d5ce8232b0cc76bad8242725f 566 etherwake_1.08-1.dsc
+ 4d8aa805cf262a613a48597e3638054dae421048 4455 etherwake_1.08.orig.tar.gz
+ f0ec9827c3ce66c0e1ea2c2f100ec144cb26b264 4145 etherwake_1.08-1.diff.gz
+ Checksums-Sha256:
+ 0077eb18c0c02e931021e523ae3ae307731726f7b00736f66139fffa7181a915 566 etherwake_1.08-1.dsc
+ e309f8a45cab2d9a955efee5423b052bc040df1e9a9b85893682ab8647264495 4455 etherwake_1.08.orig.tar.gz
+ 330e7f515d2da923d83131a1fbb5868adc4633e98a35d7b0e1787da46b63ffac 4145 etherwake_1.08-1.diff.gz
+ Checksums-Sha512:
+ 51216a36b2ab6fde6ae04d5bcb0b7cefa9a18eb4b2b11552ca8f3abde928159e93729f30c6079e913078e966817368a6095de2cb4239676a3d6ed5d49d9de699 566 etherwake_1.08-1.dsc
+ 6ab88a579ae3fdbbe0f1904712a3a42fab98fa586c3718243d2380f3cb021158c228312001b0685a77dc7171b0307d591ad971a82cd1ccd3511135b23d95ee21 4455 etherwake_1.08.orig.tar.gz
+ 814074aa8349936fbec84b3ee703788159a085f0ce4a5e35d2dbef617e1c3c6e60818d155772d47b58e0823ed4bc9af29136f64eac8d643a833660e537145cb1 4145 etherwake_1.08-1.diff.gz
<BLANKLINE>
<BLANKLINE>
END
-# XXX: maxb 2010-04-15 bug=563503
-# The regex munging above can be removed once the tests no longer need to pass
-# on Karmic and earlier.
-
Now we invoke changeOverride on just published etherwake, moving it to
component 'multiverse'.
Follow ups