Store Testsuite: list in sources

Extend read_sources to store the components of Testsuite: as a list.
pre-rebase-2016-12-12
Martin Pitt 10 years ago committed by Martin Pitt
parent a023e6ad31
commit 26df12182f

@ -235,14 +235,17 @@ check_fields = sorted(check_field_name)
class SourcePackage(object):
__slots__ = ['version', 'section', 'binaries', 'maintainer', 'is_fakesrc']
__slots__ = ['version', 'section', 'binaries', 'maintainer', 'is_fakesrc',
'testsuite']
def __init__(self, version, section, binaries, maintainer, is_fakesrc):
def __init__(self, version, section, binaries, maintainer, is_fakesrc,
testsuite):
self.version = version
self.section = section
self.binaries = binaries
self.maintainer = maintainer
self.is_fakesrc = is_fakesrc
self.testsuite = testsuite
def __getitem__(self, item):
return getattr(self, self.__slots__[item])
@ -583,6 +586,7 @@ class Britney(object):
[],
None,
True,
[],
)
self.sources['testing'][pkg_name] = src_data
@ -657,6 +661,7 @@ class Britney(object):
[],
None,
True,
[],
)
self.sources['testing'][pkg_name] = src_data
self.sources['unstable'][pkg_name] = src_data
@ -838,6 +843,7 @@ class Britney(object):
[],
maint,
False,
get_field('Testsuite', '').split(),
)
return sources
@ -987,7 +993,7 @@ class Britney(object):
srcdist[source].binaries.append(pkg_id)
# if the source package doesn't exist, create a fake one
else:
srcdist[source] = SourcePackage(source_version, 'faux', [pkg_id], None, True)
srcdist[source] = SourcePackage(source_version, 'faux', [pkg_id], None, True, [])
# add the resulting dictionary to the package list
packages[pkg] = dpkg

Loading…
Cancel
Save