launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #09214
[Merge] lp:~cjwatson/launchpad/remove-single-custom-upload-exception into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-single-custom-upload-exception into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-single-custom-upload-exception/+merge/112093
There is an ancient squamous horror lurking at the heart of archiveuploader: uploads that consist of a single custom file bypass the upload policy checks and thus may entirely lack a source package. Aside from being profoundly bad and wrong, this makes it impossible to do various useful things with these uploads, such as copy them around between pockets.
The only use of this was for translated package descriptions, and Michael Vogt has now amended his scripts to produce a proper source package instead. We should therefore close this loophole before some enterprising soul finds a new use for it.
--
https://code.launchpad.net/~cjwatson/launchpad/remove-single-custom-upload-exception/+merge/112093
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-single-custom-upload-exception into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py 2012-01-05 11:48:27 +0000
+++ lib/lp/archiveuploader/nascentupload.py 2012-06-26 12:39:19 +0000
@@ -165,21 +165,16 @@
for uploaded_file in self.changes.files:
self.run_and_collect_errors(uploaded_file.verify)
- if (len(self.changes.files) == 1 and
- isinstance(self.changes.files[0], CustomUploadFile)):
- self.logger.debug("Single Custom Upload detected.")
- else:
- policy.validateUploadType(self)
-
- if self.sourceful and not self.changes.dsc:
- self.reject(
- "Unable to find the DSC file in the source upload.")
-
- # Apply the overrides from the database. This needs to be done
- # before doing component verifications because the component
- # actually comes from overrides for packages that are not NEW.
- self.find_and_apply_overrides()
- self._overrideDDEBSs()
+ policy.validateUploadType(self)
+
+ if self.sourceful and not self.changes.dsc:
+ self.reject("Unable to find the DSC file in the source upload.")
+
+ # Apply the overrides from the database. This needs to be done
+ # before doing component verifications because the component
+ # actually comes from overrides for packages that are not NEW.
+ self.find_and_apply_overrides()
+ self._overrideDDEBSs()
# Override archive location if necessary.
self.overrideArchive()
Follow ups