From: Julien Cristau Date: Fri, 20 May 2016 11:03:52 +0000 (+0200) Subject: srcformats: reject orig.tar.gz.asc files in source format 1.0 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=fe8fc1bfe57b906e68c7ebc2cd1d0d4e67500ace;p=dak.git 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 --- diff --git a/daklib/srcformats.py b/daklib/srcformats.py index accccae6..d2829f5b 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 f93b67c9..65c0666a 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 fa6f3b38..42ff6389 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()