craft_parts.sources.tar_source module

Implement the tar source handler.

class craft_parts.sources.tar_source.TarSource(source, part_src_dir, *, cache_dir, project_dirs, source_tag=None, source_commit=None, source_branch=None, source_depth=None, source_checksum=None, source_submodules=None, ignore_patterns=None)[source]

Bases: FileSourceHandler

The tar source handler.

Parameters:
  • source (str) –

  • part_src_dir (Path) –

  • cache_dir (Path) –

  • project_dirs (ProjectDirs) –

  • source_tag (Optional[str]) –

  • source_commit (Optional[str]) –

  • source_branch (Optional[str]) –

  • source_depth (Optional[int]) –

  • source_checksum (Optional[str]) –

  • source_submodules (Optional[List[str]]) –

  • ignore_patterns (Optional[List[str]]) –

provision(dst, keep=False, src=None)[source]

Extract tarball contents to the part source dir.

Parameters:
  • dst (Path) –

  • keep (bool) –

  • src (Optional[Path]) –

Return type:

None