Package zeroinstall :: Package injector :: Module fetch :: Class Fetcher
[frames] | no frames]

Class Fetcher

source code

object --+
         |
        Fetcher

Downloads and stores various things.

Instance Methods
 
__init__(self, config)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
handler(self) source code
 
cook(self, required_digest, recipe, stores, force=False, impl_hint=None)
Follow a Recipe.
source code
 
get_feed_mirror(self, url)
Return the URL of a mirror for this feed.
source code
 
get_packagekit_feed(self, feed_url)
Send a query to PackageKit (if available) for information about this package.
source code
 
download_and_import_feed(self, feed_url, iface_cache=None, force=False)
Download the feed, download any required keys, confirm trust if needed and import.
source code
 
fetch_key_info(self, fingerprint) source code
tasks.Blocker
download_impl(self, impl, retrieval_method, stores, force=False)
Download an implementation.
source code
 
download_archive(self, download_source, force=False, impl_hint=None)
Fetch an archive.
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
 
download_impls(self, implementations, stores)
Download the given implementations, choosing a suitable retrieval method for each.
source code
model.RetrievalMethod
get_best_source(self, impl)
Return the best download source for this implementation.
source code

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

Instance Variables
config.Config config
used to get handler, iface_cache and stores
{str: KeyInfoFetcher} key_info
caches information about GPG keys
Properties

Inherited from object: __class__

Method Details

__init__(self, config)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

handler(self)

source code 
Decorators:
  • @property

cook(self, required_digest, recipe, stores, force=False, impl_hint=None)

source code 

Follow a Recipe.

Parameters:
  • impl_hint - the Implementation this is for (if any) as a hint for the GUI
Decorators:
  • @tasks.async

See Also: download_impl uses this method when appropriate

get_packagekit_feed(self, feed_url)

source code 

Send a query to PackageKit (if available) for information about this package. On success, the result is added to iface_cache.

Decorators:
  • @tasks.async

download_and_import_feed(self, feed_url, iface_cache=None, force=False)

source code 

Download the feed, download any required keys, confirm trust if needed and import.

Parameters:
  • feed_url (str) - the feed to be downloaded
  • iface_cache - (deprecated)
  • force - whether to abort and restart an existing download

download_impl(self, impl, retrieval_method, stores, force=False)

source code 

Download an implementation.

Parameters:
Returns: tasks.Blocker

download_archive(self, download_source, force=False, impl_hint=None)

source code 

Fetch an archive. You should normally call download_impl instead, since it handles other kinds of retrieval method too.

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 do nothing.

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

download_impls(self, implementations, stores)

source code 

Download the given implementations, choosing a suitable retrieval method for each. If any of the retrieval methods are DistributionSources and need confirmation, handler.confirm is called to check that the installation should proceed.