kiwi.archive Package

Submodules

kiwi.archive.cpio Module

class kiwi.archive.cpio.ArchiveCpio(filename)[source]

Bases: object

Extraction/Creation of cpio archives

Parameters:

filename (string) – filename to use for archive extraction or creation

create(source_dir, exclude=None)[source]

Create cpio archive

Parameters:
  • source_dir (string) – data source directory

  • exclude (list) – list of excluded items

extract(dest_dir)[source]

Extract cpio archive contents

Parameters:

dest_dir (string) – target data directory

kiwi.archive.tar Module

class kiwi.archive.tar.ArchiveTar(filename, create_from_file_list=True, file_list=None)[source]

Bases: object

Extraction/Creation of tar archives

The tarfile python module is not used by that class, since it does not provide support for some relevant features in comparison to the GNU tar command (e.g. numeric-owner). Moreover tarfile lacks support for xz compression under Python v2.7.

Parameters:
  • filename (string) – filename to use for archive extraction or creation

  • create_from_file_list (bool) – use file list not entire directory to create the archive

  • file_list (list) – list of files and directorie names to archive

append_files(source_dir, files_to_append, options=None)[source]

Append files to an already existing uncompressed tar archive

Parameters:
  • source_dir (string) – data source directory

  • files_to_append (list) – list of items to append

  • options (list) – custom options

create(source_dir, exclude=None, options=None)[source]

Create uncompressed tar archive

Parameters:
  • source_dir (string) – data source directory

  • exclude (list) – list of excluded items

  • options (list) – custom creation options

create_gnu_gzip_compressed(source_dir, exclude=None)[source]

Create gzip compressed tar archive

Parameters:
  • source_dir (string) – data source directory

  • exclude (list) – list of excluded items

create_xz_compressed(source_dir, exclude=None, options=None, xz_options=None)[source]

Create XZ compressed tar archive

Parameters:
  • source_dir (string) – data source directory

  • exclude (list) – list of excluded items

  • options (list) – custom tar creation options

  • xz_options (list) – custom xz compression options

extract(dest_dir)[source]

Extract tar archive contents

Parameters:

dest_dir (string) – target data directory

Module Contents