]> err.no Git - dak/commitdiff
Reject uploads that contain a native tarball and a diff.
authorChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 13:30:29 +0000 (13:30 +0000)
committerChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 13:30:29 +0000 (13:30 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
daklib/srcformats.py
tests/test_srcformats.py

index a8237c3d5e17e9cded9a24daa2d42d890146e768..0a74c19262f99fe91e6476487cabd39bf8f22faa 100644 (file)
@@ -37,6 +37,8 @@ class FormatOne(SourceFormat):
     def reject_msgs(cls, has):
         if not (has['native_tar_gz'] or (has['orig_tar_gz'] and has['debian_diff'])):
             yield "no .tar.gz or .orig.tar.gz+.diff.gz in 'Files' field."
+        if has['native_tar_gz'] and has['debian_diff']:
+            yield "native package with diff makes no sense"
         if (has['orig_tar_gz'] != has['orig_tar']) or \
            (has['native_tar_gz'] != has['native_tar']):
             yield "contains source files not allowed in format %s" % cls.name
index 1e35c6c59fb62552ae47e288893b8629ced85b29..9fec4a8765fd0db46d86fc636feee6773dcce542 100755 (executable)
@@ -53,6 +53,11 @@ class FormatOneTestCase(SourceFormatTestCase):
             'native_tar_gz': 1,
             'more_orig_tar': 1,
         })
+        self.assertRejected({
+            'native_tar': 1,
+            'native_tar_gz': 1,
+            'debian_diff': 1,
+        })
 
 class FormatTreeTestCase(SourceFormatTestCase):
     fmt = srcformats.FormatThree