craft_parts.packages.yum module

Support for files installed/updated through YUM.

class craft_parts.packages.yum.YUMRepository[source]

Bases: BaseRepository

Repository management using YUM.

classmethod configure(application_package_name)[source]

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)[source]

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()[source]

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)[source]

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)[source]

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)[source]

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)[source]

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()[source]

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)[source]

Run a command and log its output.

Parameters:

command (List[str]) –

Return type:

None