Base classes for backend implementations and helpers.
Base class for update-manager backends.
This class forms the public interface to Update Manager backends. All Backend implementations must subclass this class and implement all of its methods.
Note
The backend itself must ensure that two mutually exclusive operations are not happening at the same time.
Downloads and installs the packages specified in selcted_updates (asynchronous).
Parameters: |
|
---|
Downloads the package lists (asynchronous).
Parameter: | download_progress_handler – ListProgressHandler implementation |
---|
Gets available updates (synchronous).
Parameter: | dist_upgrade – Defines whether to do a dist upgrade or not. |
---|---|
Returns: | PackageInfoStoreBase object |
Changed in version 0.200.0~exp1: Added dist_upgrade parameter.
Early initialization code. This method must not be overridden, unless some early backend initialization has to be done.
Parameter: | application – UpdateManager.Application.Application object. |
---|
Indicates whether the package manager lock has been acquired.
Parameter: | by_us – Defines whether to check if we hold the lock ourselves or for checking whether the lock is held by another process. |
---|
Reloads the package cache (asynchronous).
Parameter: | cache_progress_handler – CacheProgressHandler implementation |
---|
Specifies whether the backend requires root privileges to operate or not.
Returns: | True if root privileges are required, False otherwise. |
---|
Package info base class.
All PackageInfo implementations must subclass this class and override all its methods.
PackageInfo Store
Object to store PackageInfoBase objects.
Adds a package to the store.
Parameter: | pkg_info – PackageInfoBase object |
---|
Adds a package removal to the store.
Parameter: | pkg_info – PackageInfoBase object |
---|
New in version 0.200.0~exp1.
Returns the number of packages to be newly installed.
Returns: | list of PackageInfoBase objects |
---|
New in version 0.200.0~exp1.
Gets a package from the internal dictionary.
Returns: | PackageInfoBase object |
---|
Gets a list of packages.
Returns: | A list of PackageInfoBase objects. |
---|
Gets a dict of packages.
Returns: | A dict with category IDs as keys, containing a dict with package names as keys and PackageInfoBase objects as values. |
---|
Returns the number of packages marked for removal.
Returns: | list of PackageInfoBase objects |
---|
New in version 0.200.0~exp1.
Gets the packages marked for removal.
Returns: | list of PackageInfoBase objects |
---|
New in version 0.200.0~exp1.
Checks if a given package exists in the store.
Parameter: | package_name – The package’s name. |
---|
Gets number of packages in the store.
Returns: | Number of packages |
---|
Package dependency representation
Check if the candidate version of the package fulfills the dependency.
Parameter: | pkg_info_store – PackageInfoStoreBase object |
---|---|
Returns: | True if dependency is fulfilled, False otherwise |
Check if the currently installed version of the package fulfills the dependency.
Returns: | True if dependency is fulfilled, False otherwise |
---|
Returns whether the dependency is a strict one.
Strict dependencies depend on exactly one version of another package.
Cache (re-)opening progress handler
Failure notification
Parameter: | failure_message – Failure message |
---|
Handle an operation update (current operation changed)
Parameter: | operation – Current operation |
---|
Handle a progress update
Parameter: | progress – Either one of CACHE_PROGRESS (negative) or a percentage. |
---|
Package list downloading handler
List download operation has failed
Parameter: | failure_message – Failure message |
---|
Item download has started
Parameters: |
|
---|
Item download has finished
Parameter: | item_uri – Item uri |
---|
Item download progress update
Parameters: |
|
---|
List download operation progress update
Parameters: |
|
---|
Commit progress handler
Download operation has started
Parameters: |
|
---|
Download operation has failed
Parameter: | failure_message – Failure message |
---|
Item download has started
Parameters: |
|
---|
Item download has finished
Parameter: | uri – Item uri |
---|
Item download update notification
Parameters: |
|
---|
Download operation update
Parameters: |
|
---|
Install operation has failed
Parameter: | error_message – Error message |
---|
Install operation update
Parameters: |
|
---|
Commit preparation begins
New in version 0.200.0~exp1.
Commit operation requires removal or installation of packages.
Parameters: |
|
---|---|
Returns: | True if the operation should continue or False to abort. |
New in version 0.200.0~exp1.