Public Member Functions | |
def | __init__ |
def | __parse_arguments |
def | __log |
def | read_sources |
def | read_binaries |
def | read_bugs |
def | __maxver |
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 | main |
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 193 of file britney.py.
|
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 199 of file britney.py. |
|
Print info messages according to verbosity level An easy-and-simple log method which prints messages to the standard output. The type parameter controls the urgency of the message, and can be equal to `I' for `Information', `W' for `Warning' and `E' for `Error'. Warnings and errors are always printed, and information are printed only if the verbose logging is enabled. Definition at line 275 of file britney.py. |
|
Return the maximum version for a given package name This method returns None if the specified source package is not available in the `dist' distribution. If the package exists, then it returns the maximum version between the source package and its binary packages. Definition at line 436 of file britney.py. |
|
Parse the command line arguments This method parses and initializes the command line arguments. While doing so, it preprocesses some of the options to be converted in a suitable form for the other methods of the class. Definition at line 235 of file britney.py. |
|
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 713 of file britney.py. |
|
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 675 of file britney.py. |
|
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 1111 of file britney.py. |
|
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 1239 of file britney.py. |
|
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 454 of file britney.py. |
|
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 560 of file britney.py. |
|
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 315 of file britney.py. |
|
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 412 of file britney.py. |
|
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 489 of file britney.py. |
|
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 586 of file britney.py. |
|
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 290 of file britney.py. |
|
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 515 of file britney.py. |
|
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 1098 of file britney.py. |
|
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 636 of file britney.py. |
|
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 764 of file britney.py. |
|
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 902 of file britney.py. |
|
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 788 of file britney.py. |
|
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 1153 of file britney.py. |