craft_parts.packages.deb module¶
Support for deb files.
- class craft_parts.packages.deb.Ubuntu¶
Bases:
BaseRepositoryRepository management for Ubuntu packages.
- classmethod configure(cls, application_package_name)¶
Set up apt options and directories.
- classmethod download_packages(package_names, *, include_recommends=False)¶
Download the specified packages to the local package cache area.
- classmethod fetch_stage_packages(*, cache_dir, package_names, stage_packages_path, base, arch, packages_filters=None)¶
Fetch stage packages to stage_packages_path.
- classmethod get_installed_packages()¶
Obtain a list of the installed packages and their versions.
Prefer dpkg-query because python-apt may try to create /etc/apt/sources.list when it is missing, which fails in unprivileged environments. Fall back to parsing /var/lib/dpkg/status when dpkg-query is unavailable or fails.
- classmethod get_package_libraries(package_name)¶
Return a list of libraries in package_name.
- classmethod get_packages_for_source_type(cls, source_type)¶
Return the packages required to work with source_type.
- classmethod install_packages(package_names, *, refresh_package_cache=True, include_recommends=False)¶
Install packages on the host system.
- classmethod is_package_installed(cls, package_name)¶
Inform if a package is installed on the host system.
- classmethod refresh_packages_list(cls)¶
Refresh the list of packages available in the repository.
- Return type:
- craft_parts.packages.deb.get_cache_dirs(cache_dir)¶
Return the paths to the stage and deb cache directories.
- craft_parts.packages.deb.get_packages_from_chisel_manifest(manifest_path)¶
Return deb packages recorded in a chisel manifest.wall file.
- Parameters:
manifest_path (
Path) – Path to the chisel manifest.- Return type:
- Returns:
A list of packages recorded in the manifest.