Packages#
- class plinth.package.Packages(component_id: str, packages: list[str | PackageExpression], skip_recommends: bool = False, conflicts: list[str] | None = None, conflicts_action: ConflictsAction | None = None, rerun_setup_on_upgrade: bool = False)[source]#
Component to manage the packages of an app.
This component is responsible for installation, upgrades and uninstallation of packages required by an app.
- __init__(component_id: str, packages: list[str | PackageExpression], skip_recommends: bool = False, conflicts: list[str] | None = None, conflicts_action: ConflictsAction | None = None, rerun_setup_on_upgrade: bool = False)[source]#
Initialize a new packages component.
‘component_id’ should be a unique ID across all components of an app and across all components.
‘packages’ is the list of Debian packages managed by this component.
‘skip_recommends’ is a boolean specifying whether recommended packages should be installed along with the listed packages.
‘conflicts’ is the list of Debian packages that can’t simultaneously be installed with packages listed here. None if there are no known conflicting packages.
‘conflicts_action’ is a string representing the action to take when it is found that conflicting Debian packages are installed on the system. None if there are no known conflicting packages.
‘rerun_setup_on_upgrade’ is a boolean to specify whether app’s setup process should be rerun if a .deb package is upgraded (by someone other than FreedomBox process).
- diagnose() list[DiagnosticCheck][source]#
Run diagnostics and return results.
- find_conflicts() list[str] | None[source]#
Return list of conflicting packages installed on the system.
- get_actual_packages() list[str][source]#
Return the computed list of packages to install.
Raise MissingPackageError if a required package is not available.
- is_available() bool[source]#
Return whether all of the packages are available.
Returns True if all of the packages are available in the user’s Debian distribution or False otherwise. Returns True if it cannot be reliably determined whether the packages are available or not.
This operation can run for a long time as package cache may be refreshed.