Packages¶
-
class
plinth.package.
Packages
(component_id: str, packages: list, skip_recommends: bool = False, conflicts: Optional[list] = None, conflicts_action: Optional[plinth.package.Packages.ConflictsAction] = None)[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, skip_recommends: bool = False, conflicts: Optional[list] = None, conflicts_action: Optional[plinth.package.Packages.ConflictsAction] = None)[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.
-
find_conflicts
() → Optional[list][source]¶ Return list of conflicting packages installed on the system.
-
get_actual_packages
() → list[source]¶ 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.
-
property
package_expressions
¶ Return the list of managed packages as expressions.
-
property
possible_packages
¶ Return the list of possible packages before resolving.
-