launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07401
[Merge] lp:~cjwatson/launchpad/remove-data-tar-xz-version-requirement into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-data-tar-xz-version-requirement into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-data-tar-xz-version-requirement/+merge/103859
In bug 619152, I added data.tar.xz upload support to Launchpad, and in https://code.launchpad.net/~cjwatson/launchpad/dpkg-xz-support-619152/+merge/32868 I noted "In order to make sure that upgrades work properly, we need to enforce a Pre-Depends on a new enough version of dpkg in packages using this, at least until the next LTS release". Now that we've had that LTS release, it is safe to drop the Pre-Depends check and the associated tests, so that we can drop various deltas against Debian.
--
https://code.launchpad.net/~cjwatson/launchpad/remove-data-tar-xz-version-requirement/+merge/103859
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-data-tar-xz-version-requirement into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/nascentuploadfile.py'
--- lib/lp/archiveuploader/nascentuploadfile.py 2012-02-21 22:46:28 +0000
+++ lib/lp/archiveuploader/nascentuploadfile.py 2012-04-27 12:19:19 +0000
@@ -711,47 +711,6 @@
"data.tar.bz2, data.tar.lzma or data.tar.xz." %
(self.filename, data_tar))
- # xz-compressed debs must pre-depend on dpkg >= 1.15.6~.
- XZ_REQUIRED_DPKG_VER = '1.15.6~'
- if data_tar == "data.tar.xz":
- parsed_deps = []
- try:
- parsed_deps = apt_pkg.parse_depends(
- self.control['Pre-Depends'])
- except (ValueError, TypeError):
- yield UploadError(
- "Can't parse Pre-Depends in the control file.")
- return
- except KeyError:
- # Go past the for loop and yield the error below.
- pass
-
- for token in parsed_deps:
- try:
- name, version, relation = token[0]
- except ValueError:
- yield("APT error processing token '%r' from Pre-Depends.")
- return
-
- if name == 'dpkg':
- # VersionCompare returns values similar to cmp;
- # negative if first < second, zero if first ==
- # second and positive if first > second.
- if apt_pkg.version_compare(
- version, XZ_REQUIRED_DPKG_VER) >= 0:
- # Pre-Depends dpkg is fine.
- return
- else:
- yield UploadError(
- "Pre-Depends dpkg version should be >= %s "
- "when using xz compression." %
- XZ_REQUIRED_DPKG_VER)
- return
-
- yield UploadError(
- "Require Pre-Depends: dpkg (>= %s) when using xz "
- "compression." % XZ_REQUIRED_DPKG_VER)
-
def verifyDebTimestamp(self):
"""Check specific DEB format timestamp checks."""
self.logger.debug("Verifying timestamps in %s" % (self.filename))
=== modified file 'lib/lp/archiveuploader/tests/test_nascentuploadfile.py'
--- lib/lp/archiveuploader/tests/test_nascentuploadfile.py 2012-01-01 02:58:52 +0000
+++ lib/lp/archiveuploader/tests/test_nascentuploadfile.py 2012-04-27 12:19:19 +0000
@@ -325,42 +325,6 @@
self.assertEquals("0.42", uploadfile.source_version)
self.assertEquals("0.42", uploadfile.control_version)
- def test_verifyFormat_xz_good_predep(self):
- # verifyFormat accepts xz-compressed .debs with a sufficient dpkg
- # pre-dependency.
- uploadfile = self.createDebBinaryUploadFile(
- "foo_0.42_i386.deb", "main/python", "unknown", "mypkg", "0.42",
- None, data_format="xz")
- control = self.getBaseControl()
- control["Pre-Depends"] = "dpkg (>= 1.15.6~)"
- uploadfile.parseControl(control)
- self.assertEqual([], list(uploadfile.verifyFormat()))
-
- def test_verifyFormat_xz_bad_predep(self):
- # verifyFormat rejects xz-compressed .debs with an insufficient dpkg
- # pre-dependency.
- uploadfile = self.createDebBinaryUploadFile(
- "foo_0.42_i386.deb", "main/python", "unknown", "mypkg", "0.42",
- None, data_format="xz")
- control = self.getBaseControl()
- control["Pre-Depends"] = "dpkg (>= 1.15.5)"
- uploadfile.parseControl(control)
- errors = list(uploadfile.verifyFormat())
- self.assertEqual(1, len(errors))
- self.assertIsInstance(errors[0], UploadError)
-
- def test_verifyFormat_xz_no_predep(self):
- # verifyFormat rejects xz-compressed .debs with no dpkg
- # pre-dependency.
- uploadfile = self.createDebBinaryUploadFile(
- "foo_0.42_i386.deb", "main/python", "unknown", "mypkg", "0.42",
- None, data_format="xz")
- control = self.getBaseControl()
- uploadfile.parseControl(control)
- errors = list(uploadfile.verifyFormat())
- self.assertEqual(1, len(errors))
- self.assertIsInstance(errors[0], UploadError)
-
def test_storeInDatabase(self):
# storeInDatabase creates a BinaryPackageRelease.
uploadfile = self.createDebBinaryUploadFile(
Follow ups