Package zeroinstall :: Package injector :: Module driver :: Class Driver
[frames] | no frames]

Class Driver

source code

object --+
         |
        Driver

Chooses a set of implementations based on a policy. Typical use:

  1. Create a Driver object, giving it the requirements about the program to be run.
  2. Call solve_with_downloads. If more information is needed, a fetch.Fetcher will be used to download it.
  3. When all downloads are complete, the solver contains the chosen versions.
  4. Use get_uncached_implementations to find where to get these versions and download them using download_uncached_implementations.
Instance Methods
 
__init__(self, config, requirements)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
[(model.Interface, model.Implementation)]
get_uncached_implementations(self)
List all chosen implementations which aren't yet available locally.
source code
 
solve_with_downloads(self, force=False, update_local=False)
Run the solver, then download any feeds that are missing or that need to be updated.
source code
 
solve_and_download_impls(self, refresh=False, select_only=False)
Run solve_with_downloads and then get the selected implementations too.
source code
bool
need_download(self)
Decide whether we need to download anything (but don't do it!)
source code
zeroinstall.support.tasks.Blocker
download_uncached_implementations(self)
Download all implementations chosen by the solver that are missing from the cache.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables
solve.Solver solver
solver used to choose a set of implementations
arch.Architecture target_arch
target architecture for binaries (deprecated)
  watchers
callbacks to invoke after solving
Properties

Inherited from object: __class__

Method Details

__init__(self, config, requirements)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
Overrides: object.__init__

Since: 0.53

solve_with_downloads(self, force=False, update_local=False)

source code 

Run the solver, then download any feeds that are missing or that need to be updated. Each time a new feed is imported into the cache, the solver is run again, possibly adding new downloads.

Parameters:
  • force (bool) - whether to download even if we're already ready to run.
  • update_local (bool) - fetch PackageKit feeds even if we're ready to run.
Decorators:
  • @tasks.async

solve_and_download_impls(self, refresh=False, select_only=False)

source code 

Run solve_with_downloads and then get the selected implementations too.

Parameters:
  • select_only (bool)
  • refresh (bool)
Decorators:
  • @tasks.async
Raises:

Since: 0.40

need_download(self)

source code 

Decide whether we need to download anything (but don't do it!)

Returns: bool
true if we MUST download something (feeds or implementations)