]> git.decadent.org.uk Git - dak.git/commitdiff
Do not load .dsc to check if an upload is sourceful.
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 18 Dec 2012 16:10:00 +0000 (17:10 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 18 Dec 2012 16:10:00 +0000 (17:10 +0100)
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
daklib/upload.py

index 8c5e3e29f29cc87475239f81d99d6a852774aaf9..1518d262ad78bc42f221a1630f90804f5578ee1a 100755 (executable)
@@ -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')
index 3d63c71e5345eec9d5c6535216a5effd5da4200b..02da698a6998497861887708333cd4cadb794134 100644 (file)
@@ -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