craft_parts.packages.yum module¶
Support for files installed/updated through YUM.
- class craft_parts.packages.yum.YUMRepository¶
Bases:
BaseRepositoryRepository management using YUM.
- classmethod configure(application_package_name)¶
Set up yum options and directories.
XXX: method left out of YUMRepository’s MVP; it should be implemented in the future to allow configuring the yum system.
- Parameters:
application_package_name (
str)- Return type:
None
- classmethod download_packages(package_names)¶
Download the specified packages to the local package cache area.
XXX: method left out of YUMRepository’s MVP; nothing will be downloaded, so raise an error to ensure it’s not used.
- Parameters:
package_names (
list[str])- Return type:
None
- classmethod get_installed_packages()¶
Obtain a list of the installed packages and their versions.
XXX: method left out of YUMRepository’s MVP; returning an empty list would lead to an inefficiency, this should be implemented in the future.
- Return type:
list[str]
- classmethod get_package_libraries(package_name)¶
Return a list of libraries in package_name.
XXX: method left out of YUMRepository’s MVP; cannot return a sane default so raising an error to ensure it’s not used.
- Parameters:
package_name (
str)- Return type:
set[str]
- classmethod get_packages_for_source_type(source_type)¶
Return a list of packages required to work with source_type.
- Parameters:
source_type (
str)- Return type:
set[str]
- classmethod install_packages(package_names, *, list_only=False, refresh_package_cache=True)¶
Install packages on the host system.
- Parameters:
package_names (
list[str])list_only (
bool)refresh_package_cache (
bool)
- Return type:
list[str]
- classmethod is_package_installed(package_name)¶
Inform if a package is installed on the host system.
XXX: method left out of YUMRepository’s MVP; returning False would lead to an inefficiency, this should be implemented in the future.
- Parameters:
package_name (
str)- Return type:
bool
- classmethod refresh_packages_list()¶
Refresh the list of packages available in the repository.
This is a NOOP in YUM based systems because yum install updates the cache itself, no separate previous action is needed.
- Return type:
None
- craft_parts.packages.yum.process_run(command)¶
Run a command and log its output.
- Parameters:
command (
list[str])- Return type:
None