SourcePackage: Add field for Build-Depends-Indep

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 8753649e54
commit 1623828a48

@ -598,14 +598,15 @@ class Britney(object):
if component != 'main':
faux_section = "%s/faux" % component
src_data = SourcePackage(version,
sys.intern(faux_section),
[],
None,
True,
None,
[],
[],
)
sys.intern(faux_section),
[],
None,
True,
None,
None,
[],
[],
)
target_suite.sources[pkg_name] = src_data
pri_source_suite.sources[pkg_name] = src_data
@ -677,14 +678,15 @@ class Britney(object):
pkg_list = [x.strip() for x in mandatory_field('Package-List').split("\n") if x.strip() != '' and not x.strip().startswith("#")]
src_data = SourcePackage(faux_version,
faux_section,
[],
None,
True,
None,
[],
[],
)
faux_section,
[],
None,
True,
None,
None,
[],
[],
)
target_suite.sources[pkg_name] = src_data
pri_source_suite.sources[pkg_name] = src_data
keep_installable.append(pkg_name)
@ -885,7 +887,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, None, [], [])
srcdist[source] = SourcePackage(source_version, 'faux', [pkg_id], None, True, None, None, [], [])
# add the resulting dictionary to the package list
packages[pkg] = dpkg

@ -87,15 +87,17 @@ class Suites(object):
class SourcePackage(object):
__slots__ = ['version', 'section', 'binaries', 'maintainer', 'is_fakesrc', 'build_deps_arch', 'testsuite', 'testsuite_triggers']
__slots__ = ['version', 'section', 'binaries', 'maintainer', 'is_fakesrc', 'build_deps_arch', 'build_deps_indep',
'testsuite', 'testsuite_triggers']
def __init__(self, version, section, binaries, maintainer, is_fakesrc, build_deps_arch, testsuite, testsuite_triggers):
def __init__(self, version, section, binaries, maintainer, is_fakesrc, build_deps_arch, build_deps_indep, testsuite, testsuite_triggers):
self.version = version
self.section = section
self.binaries = binaries
self.maintainer = maintainer
self.is_fakesrc = is_fakesrc
self.build_deps_arch = build_deps_arch
self.build_deps_indep = build_deps_indep
self.testsuite = testsuite
self.testsuite_triggers = testsuite_triggers

@ -741,12 +741,16 @@ def read_sources_file(filename, sources=None, intern=sys.intern):
build_deps_arch = sys.intern(build_deps_arch)
else:
build_deps_arch = None
build_deps_indep = get_field('Build-Depends-Indep')
if build_deps_indep is not None:
build_deps_indep = sys.intern(build_deps_indep)
sources[intern(pkg)] = SourcePackage(intern(ver),
section,
[],
maint,
False,
build_deps_arch,
build_deps_indep,
get_field('Testsuite', '').split(),
get_field('Testsuite-Triggers', '').replace(',', '').split(),
)

@ -41,7 +41,7 @@ def create_excuse(name):
def create_source_package(version, section='devel', binaries=None):
if binaries is None:
binaries = []
return SourcePackage(version, section, binaries, 'Random tester', False, None, '', '')
return SourcePackage(version, section, binaries, 'Random tester', False, None, None, [], [])
def create_policy_objects(source_name, target_version, source_version):

Loading…
Cancel
Save