[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] srcformats: reject orig.tar.gz.asc files in source format 1.0



dpkg-source in jessie doesn't know what to do with them.

Signed-off-by: Julien Cristau <jcristau@debian.org>
---
 daklib/srcformats.py        | 3 ++-
 tests/test_parse_changes.py | 2 +-
 tests/test_srcformats.py    | 7 +++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/daklib/srcformats.py b/daklib/srcformats.py
index accccae..d2829f5 100644
--- a/daklib/srcformats.py
+++ b/daklib/srcformats.py
@@ -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):
diff --git a/tests/test_parse_changes.py b/tests/test_parse_changes.py
index f93b67c..65c0666 100755
--- a/tests/test_parse_changes.py
+++ b/tests/test_parse_changes.py
@@ -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):
diff --git a/tests/test_srcformats.py b/tests/test_srcformats.py
index fa6f3b3..42ff638 100755
--- a/tests/test_srcformats.py
+++ b/tests/test_srcformats.py
@@ -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()
-- 
2.1.4


Reply to: