From: Ansgar Burchardt Date: Tue, 18 Dec 2012 16:10:00 +0000 (+0100) Subject: Do not load .dsc to check if an upload is sourceful. X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=584346fc54882d5fa7dde2fd3893e1f77c9e1573 Do not load .dsc to check if an upload is sourceful. This caused an error when rejecting an upload with an invalid .dsc. We also do not want to load the .dsc before we have made sure it matches the hash from the .changes. --- diff --git a/dak/process_upload.py b/dak/process_upload.py index 8c5e3e29..1518d262 100755 --- a/dak/process_upload.py +++ b/dak/process_upload.py @@ -243,7 +243,7 @@ def get_processed_upload(upload): pu.changes = open(upload.changes.path, 'r').read() pu.changes_filename = upload.changes.filename - pu.sourceful = upload.changes.source is not None + pu.sourceful = upload.changes.sourceful pu.source = control.get('Source') pu.version = control.get('Version') pu.architecture = control.get('Architecture') diff --git a/daklib/upload.py b/daklib/upload.py index 3d63c71e..02da698a 100644 --- a/daklib/upload.py +++ b/daklib/upload.py @@ -296,6 +296,13 @@ class Changes(object): self._source = Source(self.directory, source_files, self._keyrings, self._require_signature) return self._source + @property + def sourceful(self): + """C{True} if the upload includes source + @type: bool + """ + return "source" in self.architectures + @property def source_name(self): """source package name