Package zeroinstall :: Package injector :: Module policy :: Class Policy
[frames] | no frames]

Class Policy

source code

object --+
         |
        Policy


Deprecated: Use Driver instead.

Instance Methods
 
__init__(self, root=None, handler=None, src=None, command=-1, config=None, requirements=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
fetcher(self) source code
 
watchers(self) source code
 
solver(self) source code
 
save_config(self) source code
generator
usable_feeds(self, iface)
Generator for iface.feeds that are valid for our architecture.
source code
 
is_stale(self, feed) source code
str
get_implementation_path(self, impl)
Return the local path of impl.
source code
model.Implementation
get_implementation(self, interface)
Get the chosen implementation.
source code
bool
get_cached(self, impl)
Check whether an implementation is available locally.
source code
 
get_uncached_implementations(self) source code
 
refresh_all(self, force=True)
Start downloading all feeds for all selected interfaces.
source code
 
get_feed_targets(self, feed) source code
 
solve_with_downloads(self, force=False, update_local=False) source code
 
solve_and_download_impls(self, refresh=False, select_only=False) source code
 
need_download(self) source code
 
download_uncached_implementations(self) source code
tasks.Task
download_icon(self, interface, force=False)
Download an icon for this interface and add it to the icon cache.
source code
 
get_interface(self, uri) source code
 
command(self) source code
 
root(self) source code

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

Class Variables
  help_with_testing = property(lambda self: self.config.help_wit...
  network_use = property(lambda self: self.config.network_use, l...
  freshness = property(lambda self: self.config.freshness, lambd...
  target_arch = property(lambda self: self.driver.target_arch, l...
  implementation = property(lambda self: self.solver.selections)
  ready = property(lambda self: self.solver.ready)
  config = property(lambda self: self.driver.config)
  requirements = property(lambda self: self.driver.requirements)
  handler = property(lambda self: self.config.handler, lambda se...
Properties

Inherited from object: __class__

Method Details

__init__(self, root=None, handler=None, src=None, command=-1, config=None, requirements=None)
(Constructor)

source code 

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

Parameters:
  • requirements (requirements.Requirements) - Details about the program we want to run
  • config (config.Config Note: all other arguments are deprecated (since 0launch 0.52)) - The configuration settings to use, or None to load from disk.
Overrides: object.__init__

fetcher(self)

source code 
Decorators:
  • @property

watchers(self)

source code 
Decorators:
  • @property

solver(self)

source code 
Decorators:
  • @property

usable_feeds(self, iface)

source code 

Generator for iface.feeds that are valid for our architecture.

Returns: generator

See Also: arch

is_stale(self, feed)

source code 

Deprecated: use IfaceCache.is_stale

get_implementation_path(self, impl)

source code 

Return the local path of impl.

Returns: str
Raises:

get_implementation(self, interface)

source code 

Get the chosen implementation.

Parameters:
  • interface (Interface)
Returns: model.Implementation
Raises:
  • SafeException - if interface has not been fetched or no implementation could be chosen.

get_cached(self, impl)

source code 

Check whether an implementation is available locally.

Parameters:
  • impl (model.Implementation)
Returns: bool

refresh_all(self, force=True)

source code 

Start downloading all feeds for all selected interfaces.

Parameters:
  • force - Whether to restart existing downloads.

get_feed_targets(self, feed)

source code 

Deprecated: use IfaceCache.get_feed_targets

download_icon(self, interface, force=False)

source code 

Download an icon for this interface and add it to the icon cache. If the interface has no icon or we are offline, do nothing.

Returns: tasks.Task
the task doing the import, or None

get_interface(self, uri)

source code 

Deprecated: use iface_cache.IfaceCache.get_interface instead

command(self)

source code 
Decorators:
  • @property

root(self)

source code 
Decorators:
  • @property

Class Variable Details

help_with_testing

Value:
property(lambda self: self.config.help_with_testing, lambda self, valu\
e: setattr(self.config, 'help_with_testing', bool(value)))

network_use

Value:
property(lambda self: self.config.network_use, lambda self, value: set\
attr(self.config, 'network_use', value))

freshness

Value:
property(lambda self: self.config.freshness, lambda self, value: setat\
tr(self.config, 'freshness', str(value)))

target_arch

Value:
property(lambda self: self.driver.target_arch, lambda self, value: set\
attr(self.driver, 'target_arch', value))

handler

Value:
property(lambda self: self.config.handler, lambda self, value: setattr\
(self.config, 'handler', value))