From 68fd0ba4b2195f7202784c3c23ab800bb04e0adf Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 16 Dec 2018 19:55:02 +0000 Subject: [PATCH] Remove --components/COMPONENTS as it is auto-detected Signed-off-by: Niels Thykier --- britney.conf | 5 ----- britney.conf.template | 5 ----- britney.py | 7 +++++-- britney2/inputs/suiteloader.py | 4 ++-- britney_nobreakall.conf | 5 ----- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/britney.conf b/britney.conf index fe49068..a724e8e 100644 --- a/britney.conf +++ b/britney.conf @@ -6,11 +6,6 @@ TPU = /srv/mirrors/debian/dists/testing-proposed-updates PU = /srv/mirrors/debian/dists/proposed-updates UNSTABLE = /srv/mirrors/debian/dists/unstable -# Defaults to the value from testing's Release file (if present) -# - Not used with the legacy layout. -# -#COMPONENTS = main, non-free, contrib - # Output NONINST_STATUS = /srv/release.debian.org/britney/var/data-b2/non-installable-status EXCUSES_OUTPUT = /srv/release.debian.org/britney/var/data-b2/output/excuses.html diff --git a/britney.conf.template b/britney.conf.template index 2079374..20f0754 100644 --- a/britney.conf.template +++ b/britney.conf.template @@ -9,11 +9,6 @@ TESTING = /path/to/target/suite # TPU = /path/to/secondary-source/suite # PU = /path/to/another-source/suite -# Defaults to the value from testing's Release file (if present) -# - Not used with the legacy layout. -# -#COMPONENTS = main, non-free, contrib - # Output NONINST_STATUS = /path/to/britneys-output-dir/non-installable-status EXCUSES_OUTPUT = /path/to/britneys-output-dir/excuses.html diff --git a/britney.py b/britney.py index a12e22f..31675c2 100755 --- a/britney.py +++ b/britney.py @@ -398,8 +398,6 @@ class Britney(object): help="do not build the non-installability status, use the cache from file") parser.add_option("", "--print-uninst", action="store_true", dest="print_uninst", default=False, help="just print a summary of uninstallable packages") - parser.add_option("", "--components", action="store", dest="components", - help="Sources/Packages are laid out by components listed (, sep)") parser.add_option("", "--compute-migrations", action="store_true", dest="compute_migrations", default=True, help="Compute which packages can migrate (the default)") parser.add_option("", "--no-compute-migrations", action="store_false", dest="compute_migrations", @@ -448,6 +446,11 @@ class Britney(object): not getattr(self.options, k.lower()): setattr(self.options, k.lower(), v) + if hasattr(self.options, 'components'): + self.logger.error("The COMPONENTS configuration has been removed.") + self.logger.error("Britney will read the value from the Release file automatically") + sys.exit(1) + suite_loader = DebMirrorLikeSuiteContentLoader(self.options) try: diff --git a/britney2/inputs/suiteloader.py b/britney2/inputs/suiteloader.py index 4c56222..8dc2e5c 100644 --- a/britney2/inputs/suiteloader.py +++ b/britney2/inputs/suiteloader.py @@ -23,7 +23,7 @@ class SuiteContentLoader(object): self._outofsync_arches = SuiteContentLoader.config_str_as_list(base_config.outofsync_arches, []) self._break_arches = SuiteContentLoader.config_str_as_list(base_config.break_arches, []) self._new_arches = SuiteContentLoader.config_str_as_list(base_config.new_arches, []) - self._components = SuiteContentLoader.config_str_as_list(base_config.components) + self._components = [] self._all_binaries = {} logger_name = ".".join((self.__class__.__module__, self.__class__.__name__)) self.logger = logging.getLogger(logger_name) @@ -142,7 +142,7 @@ class DebMirrorLikeSuiteContentLoader(SuiteContentLoader): self.logger.info("The %s suite does not have a Release file.", target_suite.name) release_file = None - if self._components is None and release_file is not None: + if release_file is not None: self._components = release_file['Components'].split() self.logger.info("Using components listed in Release file: %s", ' '.join(self._components)) diff --git a/britney_nobreakall.conf b/britney_nobreakall.conf index 30aef3c..5618826 100644 --- a/britney_nobreakall.conf +++ b/britney_nobreakall.conf @@ -6,11 +6,6 @@ TPU = /srv/mirrors/debian/dists/testing-proposed-updates PU = /srv/mirrors/debian/dists/proposed-updates UNSTABLE = /srv/mirrors/debian/dists/unstable -# Defaults to the value from testing's Release file (if present) -# - Not used with the legacy layout. -# -#COMPONENTS = main, non-free, contrib - # Output NONINST_STATUS = /srv/release.debian.org/britney/var/data-b2/non-installable-status EXCUSES_OUTPUT = /srv/release.debian.org/britney/var/data-b2/output/excuses.html