mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-23 11:21:13 +00:00
Pull defaults for Components and Architectures from Release
Why duplicate that in the configuration when Britney can just pull it in the Release file for testing? :) Closes: Debian/britney2#11 Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
c86e1f7e9c
commit
dfaf0c63c3
11
britney.conf
11
britney.conf
@ -6,7 +6,10 @@ TPU = /srv/mirrors/debian/dists/testing-proposed-updates
|
||||
PU = /srv/mirrors/debian/dists/proposed-updates
|
||||
UNSTABLE = /srv/mirrors/debian/dists/unstable
|
||||
|
||||
COMPONENTS = main, non-free, contrib
|
||||
# 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
|
||||
@ -24,8 +27,10 @@ STATIC_INPUT_DIR = /srv/release.debian.org/britney/input
|
||||
# (e.g. urgency information).
|
||||
STATE_DIR = /srv/release.debian.org/britney/state
|
||||
|
||||
# List of release architectures
|
||||
ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel mips64el ppc64el s390x
|
||||
# List of architectures that Britney should consider.
|
||||
# - defaults to the value in testing's Release file (if it is present).
|
||||
# - Required for the legacy layout.
|
||||
#ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel mips64el ppc64el s390x
|
||||
|
||||
# if you're not in this list, arch: all packages are allowed to break on you
|
||||
NOBREAKALL_ARCHES = i386 amd64
|
||||
|
@ -9,8 +9,10 @@ TESTING = /path/to/target/suite
|
||||
# TPU = /path/to/secondary-source/suite
|
||||
# PU = /path/to/another-source/suite
|
||||
|
||||
# List of components to work with
|
||||
COMPONENTS = main, non-free, contrib
|
||||
# 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
|
||||
@ -29,8 +31,10 @@ HEIDI_DELTA_OUTPUT = /path/to/britneys-output-dir/HeidiResultDelta
|
||||
# (e.g. urgency information).
|
||||
STATE_DIR = /path/to/britey/state-dir
|
||||
|
||||
# List of architectures Britney should consider
|
||||
ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel powerpc ppc64el s390x
|
||||
# List of architectures that Britney should consider.
|
||||
# - defaults to the value in testing's Release file (if it is present).
|
||||
# - Required for the legacy layout.
|
||||
#ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel mips64el powerpc ppc64el s390x
|
||||
|
||||
# if you're not in this list, arch: all packages are allowed to break on you
|
||||
NOBREAKALL_ARCHES = i386 amd64
|
||||
|
22
britney.py
22
britney.py
@ -473,9 +473,18 @@ class Britney(object):
|
||||
elif not hasattr(self.options, k.lower()) or \
|
||||
not getattr(self.options, k.lower()):
|
||||
setattr(self.options, k.lower(), v)
|
||||
try:
|
||||
release_file = read_release_file(self.options.testing)
|
||||
self.log("Found a Release file in testing - using that for defaults")
|
||||
except FileNotFoundError:
|
||||
self.log("Testing does not have a Release file.")
|
||||
release_file = None
|
||||
|
||||
if getattr(self.options, "components", None):
|
||||
self.options.components = [s.strip() for s in self.options.components.split(",")]
|
||||
elif release_file and not self.options.control_files:
|
||||
self.options.components = release_file['Components'].split()
|
||||
self.log("Using components listed in Release file: %s" % ' '.join(self.options.components))
|
||||
else:
|
||||
self.options.components = None
|
||||
|
||||
@ -493,8 +502,17 @@ class Britney(object):
|
||||
self.options.break_arches = self.options.break_arches.split()
|
||||
self.options.new_arches = self.options.new_arches.split()
|
||||
|
||||
# Sort the architecture list
|
||||
allarches = sorted(self.options.architectures.split())
|
||||
if getattr(self.options, "architectures", None):
|
||||
# Sort the architecture list
|
||||
allarches = sorted(self.options.architectures.split())
|
||||
else:
|
||||
if not release_file:
|
||||
self.log("No configured architectures and there is no release file for testing", type="E")
|
||||
self.log("Please check if there is a \"Release\" file in %s" % self.options.testing, type="E")
|
||||
self.log("or if the config file contains a non-empty \"ARCHITECTURES\" field", type="E")
|
||||
sys.exit(1)
|
||||
allarches = sorted(release_file['Architectures'].split())
|
||||
self.log("Using architectures listed in Release file: %s" % ' '.join(allarches))
|
||||
arches = [x for x in allarches if x in self.options.nobreakall_arches]
|
||||
arches += [x for x in allarches if x not in arches and x not in self.options.outofsync_arches]
|
||||
arches += [x for x in allarches if x not in arches and x not in self.options.break_arches]
|
||||
|
@ -6,7 +6,10 @@ TPU = /srv/mirrors/debian/dists/testing-proposed-updates
|
||||
PU = /srv/mirrors/debian/dists/proposed-updates
|
||||
UNSTABLE = /srv/mirrors/debian/dists/unstable
|
||||
|
||||
COMPONENTS = main, non-free, contrib
|
||||
# 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
|
||||
@ -24,8 +27,10 @@ STATIC_INPUT_DIR = /srv/release.debian.org/britney/input
|
||||
# (e.g. urgency information).
|
||||
STATE_DIR = /srv/release.debian.org/britney/state
|
||||
|
||||
# List of release architectures
|
||||
ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel mips64el ppc64el s390x
|
||||
# List of architectures that Britney should consider.
|
||||
# - defaults to the value in testing's Release file (if it is present).
|
||||
# - Required for the legacy layout.
|
||||
#ARCHITECTURES = i386 amd64 arm64 armel armhf mips mipsel mips64el ppc64el s390x
|
||||
|
||||
# if you're not in this list, arch: all packages are allowed to break on you
|
||||
NOBREAKALL_ARCHES = i386 amd64 arm64 armel armhf mips mipsel mips64el ppc64el s390x
|
||||
|
Loading…
x
Reference in New Issue
Block a user