bdisk/docs/manual/dev/functions/HOST.adoc

1.5 KiB
Raw Blame History

host.py

These functions are used to perform "meta" tasks such as get information about the build host, find the build.ini file, and parse your configuration options.

getOS()

Returns the distribution of the build host.

getBits()

Returns the "bitness" of the build host (e.g. 32bit or 64bit)

getHostname()

Returns the hostname of the build host.

getConfig(conf_file = '/etc/bdisk/build.ini')

Returns a list of:

  1. the default configuration file

  2. the user-specified configuration file

conf_file

This is a full/absolute path that is searched first. If it exists and is a file, it is assumed to be the "canonical" build.ini file.

parseConfig(confs)

This function parses the configuration file(s) and returns a list of:

  1. A ConfigParser object

  2. The configuration as a dictionary

It performs some additional things, such as:

  • Converts "boolean" operations to true Python booleans

  • Tries to automatically detect the version if one isnt provided

  • Establishes the build number (this is a number that should be local to the build host)

  • Forms a list of the architectures to build

  • Validates:

  • Makes prerequisite directories

confs

A list of configuration files. See getConfig().