ocebuild.pipeline.packages#

Methods for retrieving and handling packages.

Module Contents#

Functions#

extract_opencore_packages(→ dict)

Extracts build entries as vendored packages from an OpenCore package.

extract_build_packages(→ dict)

Extracts build entries from unpacked packages.

prune_build_packages(→ dict)

Prunes the build configuration of entries that were not extracted.

ocebuild.pipeline.packages.extract_opencore_packages(opencore_pkg: str | ocebuild.third_party.cpython.pathlib.Path, target: str, resolvers: List[dict], packages: dict) dict[source]#

Extracts build entries as vendored packages from an OpenCore package.

Parameters:
  • opencore_pkg – Path to an existing OpenCore package.

  • target – The desired target architecture of the OpenCore EFI.

  • resolvers – The list of resolver entries to update.

  • packages – The list of packages to update.

Returns:

A dictionary of extracted build entries.

ocebuild.pipeline.packages.extract_build_packages(build_vars: dict, resolvers: List[dict], packages: dict, build_dir: ocebuild.third_party.cpython.pathlib.Path, *args, __wrapper: Iterator | None = None, **kwargs) dict[source]#

Extracts build entries from unpacked packages.

Parameters:
  • build_vars – The configured build variables.

  • resolvers – The list of resolver entries to update.

  • packages – The list of packages to extract.

  • build_dir – The path to the build directory.

  • *args – Additional arguments to pass to the iterator.

  • __wrapper – A wrapper function to apply to the iterator. (Optional)

  • **kwargs – Additional keyword arguments to pass to the iterator.

Returns:

A dictionary of extracted build entries.

ocebuild.pipeline.packages.prune_build_packages(build_config: dict, extracted_entries: dict, *args, __wrapper: Iterator | None = None, **kwargs) dict[source]#

Prunes the build configuration of entries that were not extracted.

Parameters:
  • build_config – The build configuration.

  • extracted_entries – The extracted build entries.

  • *args – Additional arguments to pass to the iterator.

  • __wrapper – A wrapper function to apply to the iterator. (Optional)

  • **kwargs – Additional keyword arguments to pass to the iterator.

Returns:

A dictionary of pruned build entries.