diff options
| author | Martin Pitt <martin.pitt@canonical.com> | 2015-07-01 15:49:06 +0200 |
|---|---|---|
| committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-12-12 11:33:44 +0100 |
| commit | 0d43a204710dd161cd85c60ee884172e7ca0c872 (patch) | |
| tree | 080d58b06456bacc331fe3504591c6aaf6f71841 | |
| parent | 7eb341282884985f3d5fd8889b316dbdae4f7ec9 (diff) | |
Store Testsuite: list in sources
Extend read_sources to store the components of Testsuite: as a list.
| -rwxr-xr-x | britney.py | 4 | ||||
| -rw-r--r-- | britney2/__init__.py | 5 | ||||
| -rw-r--r-- | britney2/utils.py | 1 |
3 files changed, 7 insertions, 3 deletions
@@ -575,6 +575,7 @@ class Britney(object): [], None, True, + [], ) self.sources['testing'][pkg_name] = src_data @@ -649,6 +650,7 @@ class Britney(object): [], None, True, + [], ) self.sources['testing'][pkg_name] = src_data self.sources['unstable'][pkg_name] = src_data @@ -850,7 +852,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 diff --git a/britney2/__init__.py b/britney2/__init__.py index bc7a2cf..5d1b048 100644 --- a/britney2/__init__.py +++ b/britney2/__init__.py @@ -9,14 +9,15 @@ SuiteInfo = namedtuple('SuiteInfo', [ 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]) diff --git a/britney2/utils.py b/britney2/utils.py index 3769f89..abdcac6 100644 --- a/britney2/utils.py +++ b/britney2/utils.py @@ -738,6 +738,7 @@ def read_sources_file(filename, sources=None, intern=sys.intern): [], maint, False, + get_field('Testsuite', '').split(), ) return sources |
