AOSC Wiki / Developer / Packaging / ACBS / .

ACBS - API Reference

ACBS API Reference

ACBS base

ACBS base contains basic data structures.

class acbs.base.ACBSSourceInfo(type: str, url: str, revision=None, branch=None, depth=None)

class acbs.base.ACBSPackageInfo(name: str, deps: List[str], location: str, source_uri: List[acbs.base.ACBSSourceInfo])

ACBS deps

ACBS deps contains the dependency resolver.

acbs.deps.tarjan_search(packages: OrderedDict[str, ACBSPackageInfo], search_path: str) -> List[List[acbs.base.ACBSPackageInfo]]

This function describes a Tarjan’s strongly connected components algorithm. The resulting list of ACBSPackageInfo are sorted topologically as a byproduct of the algorithm

ACBS utils

ACBS utils contains some helper functions to perform some tasks easier.

class acbs.utils.ACBSLogFormatter(fmt=None, datefmt=None, style='%', validate=True)

ABBS-like format logger formatter class


Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

acbs.utils.full_line_banner(msg: str, char='-') -> str

Print a full line banner with customizable texts


  • msg – message you want to be printed
  • char – character to use to fill the banner

acbs.utils.get_arch_name() -> Optional[str]

Detect architecture of the host machine

architecture name

acbs.utils.guess_extension_name(filename: str) -> str

Guess extension name based on filename

filename – name of the file

possible extension name

acbs.utils.human_time(full_seconds: float) -> str

Convert time span (in seconds) to more friendly format :param seconds: Time span in seconds (decimal is acceptable)

acbs.utils.print_package_names(packages: List[acbs.base.ACBSPackageInfo], limit: Optional[int] = None) -> str

Print out the names of packages


  • packages – list of ACBSPackageInfo objects
  • limit – maximum number of packages to print

a string containing the names of the packages