Package daklib :: Module rm :: Class ReverseDependencyChecker
[hide private]
[frames] | no frames]

Class ReverseDependencyChecker

source code

A bulk tester for reverse dependency checks

This class is similar to the check_reverse_depends method from "utils". However, it is primarily focused on facilitating bulk testing of reverse dependencies. It caches the state of the suite and then uses that as basis for answering queries. This saves a significant amount of time if multiple reverse dependency checks are required.

Instance Methods [hide private]
 
__init__(self, session, suite)
Creates a new ReverseDependencyChecker instance
source code
 
check_reverse_depends(self, removal_requests)
Bulk check reverse dependencies
source code
Static Methods [hide private]
 
_load_package_information(session, suite_id, suite_archs2id) source code
Method Details [hide private]

__init__(self, session, suite)
(Constructor)

source code 

Creates a new ReverseDependencyChecker instance

This will spend a significant amount of time caching data.

Parameters:
  • session (SQLA Session) - The database session in use
  • suite (str) - The name of the suite that is used as basis for removal tests.

check_reverse_depends(self, removal_requests)

source code 
Bulk check reverse dependencies

Example:
  removal_request = {
    "eclipse-rcp": None, # means ALL architectures (incl. source)
    "eclipse": None, # means ALL architectures (incl. source)
    "lintian": ["source", "all"], # Only these two "architectures".
  }
  obj.check_reverse_depends(removal_request)

@type removal_requests: dict (or a list of tuples)
@param removal_requests: A dictionary mapping a package name to a list of architectures.  The list of
  architectures decides from which the package will be removed - if the list is empty the package will
  be removed on ALL architectures in the suite (including "source").

@rtype: dict
@return: A mapping of "removed package" (as a "(pkg, arch)"-tuple) to a set of broken
  broken packages (also as "(pkg, arch)"-tuple).  Note that the architecture values
  in these tuples /can/ be "source" to reflect a breakage in build-dependencies.