qitoolchain.binary_package.core – Toolchain binary package stub

This module provides the abstract BinaryPackage class, which should be inherited when implementing additional binary package supports.

qiBuild toolchains contain a set of packages, which can be extended.

This module provides utility functions to import binary packages used by some distribution into any qiBuild toolchain.

All qiBuild packages should have the same layout.

exception qitoolchain.binary_package.core.BinaryPackageException(message)

Just a custom exception

class qitoolchain.binary_package.core.BinaryPackage(package_type, package_path)

A binary package is the endpoint of a binary package file provided by most of the Linux distribution.

It stores metadata read from the binary package itself.

load()

Set self.metadata and self.name

If the metadata has not been cached yet, then it is read/laoded and cached in the instance.

The metadata is stored in a dictionary, which has the following layout:

metadata = {
  name,
  version,
  revision,
  arch,
  arch_variant,
  dependencies = {
    buidtime,
    runtime,
    post-install,
    all,
  },
}
Returns:the metadata dictionary
get_metadata()

Get the metadata from the package.

extract(dest_dir)

Extract the binary package content, without the metadata.

Parameters:dest_dir – the extraction directory
Returns:the root directory of the extracted content