Packages(component_id: str, packages: list, skip_recommends: bool = False, conflicts: Optional[list] = None, conflicts_action: Optional[plinth.package.Packages.ConflictsAction] = None)¶
Component to manage the packages of an app.
This component is responsible for installation, upgrades and uninstallation of packages required by an app.
Action to take when a conflicting package is installed.
__init__(component_id: str, packages: list, skip_recommends: bool = False, conflicts: Optional[list] = None, conflicts_action: Optional[plinth.package.Packages.ConflictsAction] = None)¶
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.
Run diagnostics and return results.
get_actual_packages() → list¶
Return the computed list of packages to install.
Raise MissingPackageError if a required package is not available.
Return whether any of the packages are not available.
Returns True if one or more of the packages is not available in the user’s Debian distribution or False otherwise. Returns None if it cannot be reliably determined whether the packages are available or not.
Return the list of managed packages as expressions.
Return the list of possible packages before resolving.
Install the packages.