]> git.decadent.org.uk Git - dak.git/commitdiff
srcformats: reject orig.tar.gz.asc files in source format 1.0
authorJulien Cristau <jcristau@debian.org>
Fri, 20 May 2016 11:03:52 +0000 (13:03 +0200)
committerJulien Cristau <jcristau@debian.org>
Sat, 21 May 2016 12:15:07 +0000 (14:15 +0200)
dpkg-source in jessie doesn't know what to do with them.

Signed-off-by: Julien Cristau <jcristau@debian.org>
daklib/srcformats.py
tests/test_parse_changes.py
tests/test_srcformats.py

index accccae6376fb0e6e57279d8500164d27eb6aee1..d2829f5b3070ee94479faf3752f8df06175292e3 100644 (file)
@@ -88,7 +88,8 @@ class FormatOne(SourceFormat):
         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']):
+           (has['native_tar_gz'] != has['native_tar']) or \
+           has['orig_tar_sig']:
             yield "contains source files not allowed in format %s" % cls.name
 
         for msg in super(FormatOne, cls).reject_msgs(has):
index f93b67c9bc4169529bd8852f2d3bdf494d44b21d..65c0666a5a49cf92c12f8077d56ff47d8480fcb2 100755 (executable)
@@ -67,7 +67,7 @@ class ParseDscTestCase(ParseChangesTestCase):
         changes = self.assertParse('dsc/10.dsc', -1, 1)
         files = build_file_list(changes, 1)
         rejmsg = check_dsc_files('10.dsc', changes, files.keys())
-        self.assertEqual(rejmsg, [])
+        self.assertEqual(rejmsg, ['10.dsc: contains source files not allowed in format 1.0'])
 
 
 class ParseChangesTestCase(ParseChangesTestCase):
index fa6f3b386c34aa3706d62b359f2755dc31ca70c1..42ff63898059b0c5c76b771281f0ecf7aa2fb13f 100755 (executable)
@@ -56,6 +56,12 @@ class FormatOneTestCase(SourceFormatTestCase):
             'native_tar_gz': 1,
             'debian_diff': 1,
         })
+        self.assertRejected({
+            'orig_tar': 1,
+            'orig_tar_gz': 1,
+            'debian_diff': 1,
+            'orig_tar_sig': 1,
+        })
 
 class FormatTreeTestCase(SourceFormatTestCase):
     fmt = srcformats.FormatThree
@@ -123,4 +129,5 @@ class FormatFromStringTestCase(DakTestCase):
         self.assertInvalid('8.4 (hardy)')
 
 if __name__ == '__main__':
+    import unittest
     unittest.main()