提交 fe8fc1bf 编写于 作者: J Julien Cristau

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: NJulien Cristau <jcristau@debian.org>
上级 8d6f15d6
......@@ -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):
......
......@@ -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):
......
......@@ -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()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册