Public Member Functions | |
def | __init__ |
def | read_sources |
def | read_binaries |
def | read_bugs |
def | normalize_bugs |
def | read_dates |
def | read_urgencies |
def | read_approvals |
def | read_hints |
def | same_source |
def | get_dependency_solvers |
def | excuse_unsat_deps |
def | should_remove_source |
def | should_upgrade_srcarch |
def | should_upgrade_src |
def | reversed_exc_deps |
def | invalidate_excuses |
def | write_excuses |
def | get_nuninst |
def | eval_nuninst |
def | eval_uninst |
def | doop_source |
def | iter_packages |
def | do_all |
def | upgrade_testing |
def | main |
Public Attributes | |
selected | |
nuninst_orig | |
Static Public Attributes | |
tuple | HINTS_STANDARD = ("easy", "hint", "remove", "block", "unblock", "urgent", "approve") |
tuple | HINTS_ALL = ("force", "force-hint", "block-all") |
Britney, the debian testing updater script This is the script that updates the testing_ distribution. It is executed each day after the installation of the updated packages. It generates the `Packages' files for the testing distribution, but it does so in an intelligent manner; it try to avoid any inconsistency and to use only non-buggy packages. For more documentation on this script, please read the Developers Reference.
Definition at line 195 of file britney.py.
def britney.Britney.__init__ | ( | self | ) |
Class constructor This method initializes and populates the data lists, which contain all the information needed by the other methods of the class.
Definition at line 201 of file britney.py.
def britney.Britney.excuse_unsat_deps | ( | self, | ||
pkg, | ||||
src, | ||||
arch, | ||||
suite, | ||||
excuse = None , |
||||
excluded = [] | ||||
) |
Find unsatisfied dependencies for a binary package This method analyzes the dependencies of the binary package specified by the parameter `pkg', built from the source package `src', for the architecture `arch' within the suite `suite'. If the dependency can't be satisfied in testing and/or unstable, it updates the excuse passed as parameter. The dependency fields checked are Pre-Depends and Depends.
Definition at line 709 of file britney.py.
def britney.Britney.get_dependency_solvers | ( | self, | ||
block, | ||||
arch, | ||||
distribution, | ||||
excluded = [] | ||||
) |
Find the packages which satisfy a dependency block This method returns the list of packages which satisfy a dependency block (as returned by apt_pkg.ParseDepends) for the given architecture and distribution. It returns a tuple with two items: the first is a boolean which is True if the dependency is satisfied, the second is the list of the solving packages.
Definition at line 669 of file britney.py.
def britney.Britney.invalidate_excuses | ( | self, | ||
valid, | ||||
invalid | ||||
) |
Invalidate impossible excuses This method invalidates the impossible excuses, which depend on invalid excuses. The two parameters contains the list of `valid' and `invalid' excuses.
Definition at line 1112 of file britney.py.
def britney.Britney.main | ( | self | ) |
Main method This is the entry point for the class: it includes the list of calls for the member methods which will produce the output files.
Definition at line 1455 of file britney.py.
def britney.Britney.normalize_bugs | ( | self | ) |
Normalize the release critical bug summaries for testing and unstable The method doesn't return any value: it directly modifies the object attribute `bugs'.
Definition at line 448 of file britney.py.
def britney.Britney.read_approvals | ( | self, | ||
basedir | ||||
) |
Read the approval commands from the specified directory The approval commands are read from the files contained by the `Approved' directory within the directory specified as `basedir' parameter. The name of the files has to be the same of the authorized users for the approvals. The file contains rows with the format: <package-name> <version> The method returns a dictionary where the key is the binary package name followed by an underscore and the version number, and the value is the user who submitted the command.
Definition at line 554 of file britney.py.
def britney.Britney.read_binaries | ( | self, | ||
basedir, | ||||
distribution, | ||||
arch | ||||
) |
Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amount of memory needed, not all the fields are loaded in memory. The available fields are Version, Source, Pre-Depends, Depends, Conflicts, Provides and Architecture. After reading the packages, reverse dependencies are computed and saved in the `rdepends' keys, and the `Provides' field is used to populate the virtual packages list. The dependencies are parsed with the apt.pkg.ParseDepends method, and they are stored both as the format of its return value and text. The method returns a tuple. The first element is a list where every item represents a binary package as a dictionary; the second element is a dictionary which maps virtual packages to real packages that provide it.
Definition at line 317 of file britney.py.
def britney.Britney.read_bugs | ( | self, | ||
basedir | ||||
) |
Read the release critial bug summary from the specified directory The RC bug summaries are read from the `Bugs' file within the directory specified as `basedir' parameter. The file contains rows with the format: <package-name> <count-of-rc-bugs> The method returns a dictionary where the key is the binary package name and the value is the number of open RC bugs for it.
Definition at line 406 of file britney.py.
def britney.Britney.read_dates | ( | self, | ||
basedir | ||||
) |
Read the upload date for the packages from the specified directory The upload dates are read from the `Date' file within the directory specified as `basedir' parameter. The file contains rows with the format: <package-name> <version> <date-of-upload> The dates are expressed as days starting from the 1970-01-01. The method returns a dictionary where the key is the binary package name and the value is tuple with two items, the version and the date.
Definition at line 483 of file britney.py.
def britney.Britney.read_hints | ( | self, | ||
basedir | ||||
) |
Read the hint commands from the specified directory The hint commands are read from the files contained by the `Hints' directory within the directory specified as `basedir' parameter. The name of the files has to be the same of the authorized users for the hints. The file contains rows with the format: <command> <package-name>[/<version>] The method returns a dictionary where the key is the command, and the value is the list of affected packages.
Definition at line 580 of file britney.py.
def britney.Britney.read_sources | ( | self, | ||
basedir | ||||
) |
Read the list of source packages from the specified directory The source packages are read from the `Sources' file within the directory specified as `basedir' parameter. Considering the large amount of memory needed, not all the fields are loaded in memory. The available fields are Version, Maintainer and Section. The method returns a list where every item represents a source package as a dictionary.
Definition at line 292 of file britney.py.
def britney.Britney.read_urgencies | ( | self, | ||
basedir | ||||
) |
Read the upload urgency of the packages from the specified directory The upload urgencies are read from the `Urgency' file within the directory specified as `basedir' parameter. The file contains rows with the format: <package-name> <version> <urgency> The method returns a dictionary where the key is the binary package name and the value is the greatest urgency from the versions of the package that are higher then the testing one.
Definition at line 509 of file britney.py.
def britney.Britney.reversed_exc_deps | ( | self | ) |
Reverse the excuses dependencies This method returns a dictionary where the keys are the package names and the values are the excuse names which depend on it.
Definition at line 1099 of file britney.py.
def britney.Britney.same_source | ( | self, | ||
sv1, | ||||
sv2 | ||||
) |
Check if two version numbers are built from the same source This method returns a boolean value which is true if the two version numbers specified as parameters are built from the same source. The main use of this code is to detect binary-NMU.
Definition at line 630 of file britney.py.
def britney.Britney.should_remove_source | ( | self, | ||
pkg | ||||
) |
Check if a source package should be removed from testing This method checks if a source package should be removed from the testing distribution; this happen if the source package is not present in the unstable distribution anymore. It returns True if the package can be removed, False otherwise. In the former case, a new excuse is appended to the the object attribute excuses.
Definition at line 765 of file britney.py.
def britney.Britney.should_upgrade_src | ( | self, | ||
src, | ||||
suite | ||||
) |
Check if source package should be upgraded This method checks if a source package should be upgraded. The analisys is performed for the source package specified by the `src' parameter, checking the architecture `arch' for the distribution `suite'. 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 the the object attribute excuses.
Definition at line 903 of file britney.py.
def britney.Britney.should_upgrade_srcarch | ( | self, | ||
src, | ||||
arch, | ||||
suite | ||||
) |
Check if binary package should be upgraded This method checks if a binary package should be upgraded; this can happen also if the binary package is a binary-NMU for the given arch. The analisys is performed for the source package specified by the `src' parameter, checking the architecture `arch' for the distribution `suite'. 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 the the object attribute excuses.
Definition at line 789 of file britney.py.
def britney.Britney.upgrade_testing | ( | self | ) |
Upgrade testing using the unstable packages This method tries to upgrade testing using the packages from unstable.
Definition at line 1438 of file britney.py.
def britney.Britney.write_excuses | ( | self | ) |
Produce and write the update excuses This method handles the update excuses generation: the packages are looked to determine whether they are valid candidates. For the details of this procedure, please refer to the module docstring.
Definition at line 1154 of file britney.py.