diff --git a/britney.py b/britney.py index b35fd3c..7a159bd 100755 --- a/britney.py +++ b/britney.py @@ -2577,8 +2577,7 @@ class Britney(object): if self.options.control_files: self.logger.info("Writing new control files for the target suite to %s", target_suite.path) - write_controlfiles(self.sources, self.binaries, - target_suite.name, target_suite.path) + write_controlfiles(target_suite) for policy in self.policies: policy.save_state(self) diff --git a/britney2/utils.py b/britney2/utils.py index 9a1879e..a8e1af0 100644 --- a/britney2/utils.py +++ b/britney2/utils.py @@ -421,7 +421,7 @@ def relation_atom_to_string(atom): return pkg -def write_controlfiles(sources, packages, suite, basedir): +def write_controlfiles(target_suite): """Write the control files This method writes the control files for the binary packages of all @@ -430,8 +430,9 @@ def write_controlfiles(sources, packages, suite, basedir): these files may omit a lot of regular fields. """ - sources_s = sources[suite] - packages_s = packages[suite] + basedir = target_suite.path + sources_s = target_suite.sources + packages_s = target_suite.binaries key_pairs = ((SECTION, 'Section'), (ARCHITECTURE, 'Architecture'), (MULTIARCH, 'Multi-Arch'), (SOURCE, 'Source'),