kiwi.package_manager Package

Submodules

kiwi.package_manager.base Module

class kiwi.package_manager.base.PackageManagerBase(repository, custom_args=None)[source]

Bases: object

Implements base class for installation/deletion of packages and collections using a package manager

Attributes

  • repository
    Instance of Repository
  • root_dir
    root directory path name
  • root_bind
    Instance of RootBind
  • package_requests
    list of packages to install or delete
  • collection_requests
    list of collections to install
  • product_requests
    list of products to install
cleanup_requests()[source]

Cleanup request queues

database_consistent()[source]

Check if package database is consistent

Implementation in specialized package manager class

dump_reload_package_database(version=45)[source]

For rpm based package managers, dump and reload the database to match the desired rpm db version

Implementation in specialized package manager class

Parameters:version (string) – unused
match_package_deleted(package_list, log_line)[source]

Match expression to indicate a package has been deleted

Implementation in specialized package manager class

Parameters:
  • package_list (list) – unused
  • log_line (string) – unused
match_package_installed(package_list, log_line)[source]

Match expression to indicate a package has been installed

Implementation in specialized package manager class

Parameters:
  • package_list (list) – unused
  • log_line (string) – unused
post_init(custom_args=None)[source]

Post initialization method

Implementation in specialized package manager class

Parameters:custom_args (list) – unused
process_delete_requests(force=False)[source]

Process package delete requests (chroot)

Implementation in specialized package manager class

Parameters:force (bool) – unused
process_install_requests()[source]

Process package install requests for image phase (chroot)

Implementation in specialized package manager class

process_install_requests_bootstrap()[source]

Process package install requests for bootstrap phase (no chroot)

Implementation in specialized package manager class

process_only_required()[source]

Setup package processing only for required packages

Implementation in specialized package manager class

Setup package processing to also include recommended dependencies

Implementation in specialized package manager class

request_collection(name)[source]

Queue a package collection

Implementation in specialized package manager class

Parameters:name (string) – unused
request_package(name)[source]

Queue a package request

Implementation in specialized package manager class

Parameters:name (string) – unused
request_package_exclusion(name)[source]

Queue a package exclusion(skip) request

Implementation in specialized package manager class

Parameters:name (string) – unused
request_package_lock(name)[source]

Queue a package exclusion(skip) request

Obsolete method, only kept for API compatbility Method calls: request_package_exclusion

request_product(name)[source]

Queue a product request

Implementation in specialized package manager class

Parameters:name (string) – unused
update()[source]

Process package update requests (chroot)

Implementation in specialized package manager class

kiwi.package_manager.yum Module

class kiwi.package_manager.yum.PackageManagerYum(repository, custom_args=None)[source]

Bases: kiwi.package_manager.base.PackageManagerBase

Implements base class for installation/deletion of packages and collections using yum

database_consistent()[source]

Check if rpm package database is consistent

dump_reload_package_database(version=45)[source]

Dump and reload the rpm database to match the desired rpm db version

For the supported RHEL versions there is no dump/reload cycle required

Parameters:version (string) – unused
match_package_deleted(package_name, yum_output)[source]

Match expression to indicate a package has been deleted

Parameters:
  • package_list (list) – list of all packages
  • log_line (string) – yum status line
match_package_installed(package_name, yum_output)[source]

Match expression to indicate a package has been installed

This match for the package to be installed in the output of the yum command is not 100% accurate. There might be false positives due to sub package names starting with the same base package name

Parameters:
  • package_list (list) – list of all packages
  • log_line (string) – yum status line
post_init(custom_args=None)[source]

Post initialization method

Store custom yum arguments

Attributes

  • yum_args
    yum arguments from repository runtime configuration
  • command_env
    yum command environment from repository runtime configuration
Parameters:custom_args (list) – custom yum arguments
process_delete_requests(force=False)[source]

Process package delete requests (chroot)

Parameters:force (bool) – force deletion: true|false
process_install_requests()[source]

Process package install requests for image phase (chroot)

process_install_requests_bootstrap()[source]

Process package install requests for bootstrap phase (no chroot)

process_only_required()[source]

Setup package processing only for required packages

Setup package processing to also include recommended dependencies.

request_collection(name)[source]

Queue a collection request

Parameters:name (string) – yum group name
request_package(name)[source]

Queue a package request

Parameters:name (string) – package name
request_package_exclusion(name)[source]

Queue a package exclusion(skip) request

Package exclusion for yum package manager not yet implemented

Parameters:name (string) – unused
request_product(name)[source]

Queue a product request

There is no product definition in the rhel repo data

Parameters:name (string) – unused
update()[source]

Process package update requests (chroot)

kiwi.package_manager.zypper Module

class kiwi.package_manager.zypper.PackageManagerZypper(repository, custom_args=None)[source]

Bases: kiwi.package_manager.base.PackageManagerBase

Implements base class for installation/deletion of packages and collections using zypper

database_consistent()[source]

Check if rpm package database is consistent

dump_reload_package_database(version=45)[source]

Dump and reload the rpm database to match the desired rpm db version Supported target rpm database db versions are

  • 45 (db45_load)
  • 48 (db48_load)
Parameters:version (string) – target rpm db version
match_package_deleted(package_name, zypper_output)[source]

Match expression to indicate a package has been deleted

Parameters:
  • package_list (list) – list of all packages
  • log_line (string) – zypper status line
match_package_installed(package_name, zypper_output)[source]

Match expression to indicate a package has been installed

This match for the package to be installed in the output of the zypper command is not 100% accurate. There might be false positives due to sub package names starting with the same base package name

Parameters:
  • package_list (list) – list of all packages
  • log_line (string) – zypper status line
post_init(custom_args=None)[source]

Post initialization method

Store custom zypper arguments

Attributes

  • zypper_args
    zypper arguments from repository runtime configuration
  • command_env
    zypper command environment from repository runtime configuration
Parameters:custom_args (list) – custom zypper arguments
process_delete_requests(force=False)[source]

Process package delete requests (chroot)

Parameters:force (bool) – force deletion: true|false
process_install_requests()[source]

Process package install requests for image phase (chroot)

process_install_requests_bootstrap()[source]

Process package install requests for bootstrap phase (no chroot)

process_only_required()[source]

Setup package processing only for required packages

Setup package processing to also include recommended dependencies.

request_collection(name)[source]

Queue a collection request

Parameters:name (string) – zypper pattern name
request_package(name)[source]

Queue a package request

Parameters:name (string) – package name
request_package_exclusion(name)[source]

Queue a package exclusion(skip) request

Parameters:name (string) – package name
request_product(name)[source]

Queue a product request

Parameters:name (string) – zypper product name
update()[source]

Process package update requests (chroot)

Module Contents

class kiwi.package_manager.PackageManager[source]

Bases: object

Package manager factory

Attributes

  • repository
    Instance of Repository
  • package_manager
    package manager name
  • custom_args
    custom package manager arguments list