Remove trailing whitespace

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 822a8c712c
commit c9d523da93
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

@ -28,7 +28,7 @@ to always be fully installable and close to being a release candidate.
Britney's source code is split between two different but related tasks: Britney's source code is split between two different but related tasks:
the first one is the generation of the update excuses, while the the first one is the generation of the update excuses, while the
second tries to update testing with the valid candidates; first second tries to update testing with the valid candidates; first
each package alone, then larger and even larger sets of packages each package alone, then larger and even larger sets of packages
together. Each try is accepted if testing is not more uninstallable together. Each try is accepted if testing is not more uninstallable
after the update than before. after the update than before.
@ -53,7 +53,7 @@ Other than source and binary packages, Britney loads the following data:
* BugsV, which contains the list of release-critical bugs for a given * BugsV, which contains the list of release-critical bugs for a given
version of a source or binary package (see RCBugPolicy.read_bugs). version of a source or binary package (see RCBugPolicy.read_bugs).
* Dates, which contains the date of the upload of a given version * Dates, which contains the date of the upload of a given version
of a source package (see Britney.read_dates). of a source package (see Britney.read_dates).
* Urgencies, which contains the urgency of the upload of a given * Urgencies, which contains the urgency of the upload of a given
@ -71,7 +71,7 @@ instead explained in the chapter "Excuses Generation".
An excuse is a detailed explanation of why a package can or cannot An excuse is a detailed explanation of why a package can or cannot
be updated in the testing distribution from a newer package in be updated in the testing distribution from a newer package in
another distribution (like for example unstable). The main purpose another distribution (like for example unstable). The main purpose
of the excuses is to be written in an HTML file which will be of the excuses is to be written in an HTML file which will be
published over HTTP. The maintainers will be able to parse it manually published over HTTP. The maintainers will be able to parse it manually
or automatically to find the explanation of why their packages have or automatically to find the explanation of why their packages have
been updated or not. been updated or not.
@ -222,9 +222,9 @@ __version__ = '2.0'
class Britney(object): class Britney(object):
"""Britney, the Debian testing updater script """Britney, the Debian testing updater script
This is the script that updates the testing distribution. It is executed This is the script that updates the testing distribution. It is executed
each day after the installation of the updated packages. It generates the each day after the installation of the updated packages. It generates the
`Packages' files for the testing distribution, but it does so in an `Packages' files for the testing distribution, but it does so in an
intelligent manner; it tries to avoid any inconsistency and to use only intelligent manner; it tries to avoid any inconsistency and to use only
non-buggy packages. non-buggy packages.
@ -671,12 +671,12 @@ class Britney(object):
def read_hints(self, hintsdir): def read_hints(self, hintsdir):
"""Read the hint commands from the specified directory """Read the hint commands from the specified directory
The hint commands are read from the files contained in the directory The hint commands are read from the files contained in the directory
specified by the `hintsdir' parameter. specified by the `hintsdir' parameter.
The names of the files have to be the same as the authorized users The names of the files have to be the same as the authorized users
for the hints. for the hints.
The file contains rows with the format: The file contains rows with the format:
<command> <package-name>[/<version>] <command> <package-name>[/<version>]
@ -814,7 +814,7 @@ class Britney(object):
def should_remove_source(self, pkg): def should_remove_source(self, pkg):
"""Check if a source package should be removed from testing """Check if a source package should be removed from testing
This method checks if a source package should be removed from the This method checks if a source package should be removed from the
target suite; this happens if the source package is not target suite; this happens if the source package is not
present in the primary source suite anymore. present in the primary source suite anymore.
@ -853,7 +853,7 @@ class Britney(object):
This method checks if the binary packages produced by the source This method checks if the binary packages produced by the source
package on the given architecture should be upgraded; this can package on the given architecture should be upgraded; this can
happen also if the migration is a binary-NMU for the given arch. happen also if the migration is a binary-NMU for the given arch.
It returns False if the given packages don't need to be upgraded, It returns False if the given packages don't need to be upgraded,
True otherwise. In the former case, a new excuse is appended to True otherwise. In the former case, a new excuse is appended to
the object attribute excuses. the object attribute excuses.
@ -873,7 +873,7 @@ class Britney(object):
excuse.set_vers(source_t.version, source_t.version) excuse.set_vers(source_t.version, source_t.version)
source_u.maintainer and excuse.set_maint(source_u.maintainer) source_u.maintainer and excuse.set_maint(source_u.maintainer)
source_u.section and excuse.set_section(source_u.section) source_u.section and excuse.set_section(source_u.section)
# if there is a `remove' hint and the requested version is the same as the # if there is a `remove' hint and the requested version is the same as the
# version in testing, then stop here and return False # version in testing, then stop here and return False
# (as a side effect, a removal may generate such excuses for both the source # (as a side effect, a removal may generate such excuses for both the source
@ -1031,9 +1031,9 @@ class Britney(object):
"""Check if source package should be upgraded """Check if source package should be upgraded
This method checks if a source package should be upgraded. The analysis This method checks if a source package should be upgraded. The analysis
is performed for the source package specified by the `src' parameter, is performed for the source package specified by the `src' parameter,
for the distribution `source_suite'. for the distribution `source_suite'.
It returns False if the given package doesn't need to be upgraded, It returns False if the given package doesn't need to be upgraded,
True otherwise. In the former case, a new excuse is appended to True otherwise. In the former case, a new excuse is appended to
the object attribute excuses. the object attribute excuses.
@ -1232,7 +1232,7 @@ class Britney(object):
self.excuses[excuse.name] = excuse self.excuses[excuse.name] = excuse
return excuse.is_valid return excuse.is_valid
def write_excuses(self): def write_excuses(self):
"""Produce and write the update excuses """Produce and write the update excuses
@ -2052,7 +2052,7 @@ class Britney(object):
def main(self): def main(self):
"""Main method """Main method
This is the entry point for the class: it includes the list of calls This is the entry point for the class: it includes the list of calls
for the member methods which will produce the output files. for the member methods which will produce the output files.
""" """

@ -58,7 +58,7 @@ class Completer(object):
self.tpu_packages = sorted(tpu) self.tpu_packages = sorted(tpu)
target_suite = suite_info.target_suite.sources target_suite = suite_info.target_suite.sources
self.testing_packages = sorted("%s/%s" % (pkg, target_suite[pkg].version) for pkg in target_suite) self.testing_packages = sorted("%s/%s" % (pkg, target_suite[pkg].version) for pkg in target_suite)
def completer(self, text, state): def completer(self, text, state):
"""readline completer (see the readline API)""" """readline completer (see the readline API)"""

@ -42,7 +42,7 @@ VERDICT2DESC = {
class Excuse(object): class Excuse(object):
"""Excuse class """Excuse class
This class represents an update excuse, which is a detailed explanation This class represents an update excuse, which is a detailed explanation
of why a package can or cannot be updated in the testing distribution from of why a package can or cannot be updated in the testing distribution from
a newer package in another distribution (like for example unstable). a newer package in another distribution (like for example unstable).
@ -59,7 +59,7 @@ class Excuse(object):
def __init__(self, name): def __init__(self, name):
"""Class constructor """Class constructor
This method initializes the excuse with the specified name and This method initializes the excuse with the specified name and
the default values. the default values.
""" """

@ -57,9 +57,9 @@ class Hint(object):
self._active = True self._active = True
self._type = hint_type self._type = hint_type
self._packages = packages self._packages = packages
self.check() self.check()
def check(self): def check(self):
for package in self.packages: for package in self.packages:
# TODO check if hint is allowed to specify architecture # TODO check if hint is allowed to specify architecture

@ -803,10 +803,10 @@ class AutopkgtestPolicy(BasePolicy):
if trigsrc == src and apt_pkg.version_compare(ver, trigver) < 0: if trigsrc == src and apt_pkg.version_compare(ver, trigver) < 0:
self.logger.error('test trigger %s, but run for older version %s, ignoring', trigger, ver) self.logger.error('test trigger %s, but run for older version %s, ignoring', trigger, ver)
return return
result = self.test_results.setdefault(trigger, {}).setdefault( result = self.test_results.setdefault(trigger, {}).setdefault(
src, {}).setdefault(arch, [Result.FAIL, None, '']) src, {}).setdefault(arch, [Result.FAIL, None, ''])
# don't clobber existing passed results with non-passing ones from # don't clobber existing passed results with non-passing ones from
# re-runs, except for reference updates # re-runs, except for reference updates
if status == Result.PASS or result[0] != Result.PASS or \ if status == Result.PASS or result[0] != Result.PASS or \

@ -13,7 +13,7 @@ You will need some packages to run britney and the test suites::
# Runtime dependencies # Runtime dependencies
apt install python3 python3-apt python3-yaml apt install python3 python3-apt python3-yaml
# Test dependencies # Test dependencies
apt install python3-pytest libclass-accessor-perl rsync apt install python3-pytest libclass-accessor-perl rsync
# Documentation generator # Documentation generator
apt install python3-sphinx apt install python3-sphinx
# AMQP integration for autopkgtest policy (optional runtime dependency) # AMQP integration for autopkgtest policy (optional runtime dependency)

@ -33,7 +33,7 @@ of the following points:
1. The migration items pass a number of policies for the target 1. The migration items pass a number of policies for the target
suite. Most of these policies are basically that the suite. Most of these policies are basically that the
migration items do not regress on selected QA checks. migration items do not regress on selected QA checks.
* An item satisfying this part is called a `valid candiate`. * An item satisfying this part is called a `valid candiate`.
2. Installability will not regress as a result of 2. Installability will not regress as a result of
@ -67,7 +67,7 @@ migration item and various QA checks/policies will be applied to the
item. item.
Once britney deems the item ready, it will attempt to Once britney deems the item ready, it will attempt to
migrate the item (i.e. source with its binaries) to the migrate the item (i.e. source with its binaries) to the
target suite. target suite.
@ -249,13 +249,13 @@ we are not actually sure whether this problem is architecture specific. For
Trying easy from autohinter: asis/2017-1 dh-ada-library/6.12 [...] Trying easy from autohinter: asis/2017-1 dh-ada-library/6.12 [...]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
migration item(s) being attemped migration item(s) being attemped
[... several lines of statistics from start, before and after ...] [... several lines of statistics from start, before and after ...]
* amd64: asis-programs, libasis2017, libasis2017-dev, libaws-bin, [...] * amd64: asis-programs, libasis2017, libasis2017-dev, libaws-bin, [...]
^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
||||| The binary packages becoming uninstallable on amd64 ||||| The binary packages becoming uninstallable on amd64
Affected architecture (here "amd64") Affected architecture (here "amd64")
* i386: asis-programs, libasis2017, libasis2017-dev, libaws-bin, [...] * i386: asis-programs, libasis2017, libasis2017-dev, libaws-bin, [...]
^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
||||| The binary packages becoming uninstallable on i386 ||||| The binary packages becoming uninstallable on i386

@ -88,7 +88,7 @@ non-obvious issues:
* If the bugs policy is enabled, an bug in the old binaries that * If the bugs policy is enabled, an bug in the old binaries that
is fixed in the new version will still be a blocker. Here, the is fixed in the new version will still be a blocker. Here, the
best solution is to get rid of the old binaries. best solution is to get rid of the old binaries.
* Note: the bugs data is not versioned so britney cannot tell which * Note: the bugs data is not versioned so britney cannot tell which
versions the bug applies to. Just which suite they affect. versions the bug applies to. Just which suite they affect.
@ -97,7 +97,7 @@ non-obvious issues:
britney will also attempt to keep the old binaries around as long britney will also attempt to keep the old binaries around as long
as they are used. The most often cause of this when the old as they are used. The most often cause of this when the old
binaries are not co-installable with the new ones. binaries are not co-installable with the new ones.
* Note: Britney generally only works with the highest version of a * Note: Britney generally only works with the highest version of a
given binary. If you have libfoo1 depends on libfoo-data v1 and given binary. If you have libfoo1 depends on libfoo-data v1 and
then libfoo2 depends on libfoo-data v2, then libfoo1 will become then libfoo2 depends on libfoo-data v2, then libfoo1 will become

@ -2557,7 +2557,7 @@ class T(TestBase):
self.assertEqual(exc['green']['policy_info']['autopkgtest']['verdict'], 'PASS') self.assertEqual(exc['green']['policy_info']['autopkgtest']['verdict'], 'PASS')
# instead, it should cause the age to sky-rocket # instead, it should cause the age to sky-rocket
self.assertEqual(exc['green']['policy_info']['age']['age-requirement'], 40) self.assertEqual(exc['green']['policy_info']['age']['age-requirement'], 40)
def test_multi_rdepends_with_tests_no_penalty(self): def test_multi_rdepends_with_tests_no_penalty(self):
'''Check that penalties are not applied for "urgency >= high"''' '''Check that penalties are not applied for "urgency >= high"'''

Loading…
Cancel
Save