[dak/master] 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.
---
dak/process_upload.py | 2 +-
daklib/upload.py | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dak/process_upload.py b/dak/process_upload.py
index 8c5e3e2..1518d26 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 3d63c71..02da698 100644
--- a/daklib/upload.py
+++ b/daklib/upload.py
@@ -297,6 +297,13 @@ class Changes(object):
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
@type: str
--
1.7.2.5
Reply to: