Fix architecture check if Release file is used

When the architecture are read from the Release file, they are not
defined in the config file.

Adding 'all' as an architecture will not give the correct result. To
avoid confusion, explicitly check for this and error out if it is added.
ubuntu/rebased
Ivo De Decker 5 years ago
parent 9056323165
commit 64ba19cde4

@ -19,8 +19,6 @@ class SuiteContentLoader(object):
def __init__(self, base_config):
self._base_config = base_config
self._architectures = SuiteContentLoader.config_str_as_list(base_config.architectures)
assert 'all' not in self._architectures, "all not allowed in architectures"
self._nobreakall_arches = SuiteContentLoader.config_str_as_list(base_config.nobreakall_arches, [])
self._outofsync_arches = SuiteContentLoader.config_str_as_list(base_config.outofsync_arches, [])
self._break_arches = SuiteContentLoader.config_str_as_list(base_config.break_arches, [])
@ -135,6 +133,7 @@ class DebMirrorLikeSuiteContentLoader(SuiteContentLoader):
# Intern architectures for efficiency; items in this list will be used for lookups and
# building items/keys - by intern strings we reduce memory (considerably).
self._architectures = [sys.intern(arch) for arch in allarches]
assert 'all' not in self._architectures, "all not allowed in architectures"
def _get_suite_name(self, suite, release_file):
for name in ('Suite', 'Codename'):

Loading…
Cancel
Save