module documentation

Build a Debian package out of a Git repository

Function build_parser Undocumented
Function changes_file_name Undocumented
Function changes_file_suffix No summary
Function check_branch Check if we're on the right branch and bail out otherwise
Function check_tag Perform specified consistency checks on git history
Function clean_working_tree Clean the working tree.
Function disable_hooks Disable all hooks (except for builder)
Function export_source Export a version of the source tree when building in a separate directory
Function get_pbuilder_dist Determin the dist to build for with pbuilder/cowbuilder
Function main Undocumented
Function mangle_export_wc_opts Make building with --export=WC simpler
Function maybe_write_tree Write a tree of the index or working copy if necessary
Function move_old_export move a build tree away if it exists
Function overlay_extract_origs Overlay extract orig tarballs to export dir before exporting debian dir from git
Function parse_args Undocumented
Function prepare_output_dir Prepare the directory where the build result will be put
Function setup_pbuilder Setup environment variables for git-pbuilder
Function source_vfs Init source package info either from git or from working copy
def build_parser(name, prefix=None):

Undocumented

def changes_file_name(source, build_dir, builder, dpkg_args, arch):

Undocumented

def changes_file_suffix(builder, dpkg_args, arch):
>>> changes_file_suffix('debuild', ['-A'], '')
'all'
>>> changes_file_suffix('debuild', ['-S'], '')
'source'
>>> changes_file_suffix('debuild -A', ['-uc', '-us'], '')
'all'
>>> changes_file_suffix('debuild -S', ['-uc', '-us'], '')
'source'
>>> changes_file_suffix('debuild', [], '') == du.get_arch()
True
>>> changes_file_suffix('debuild', [], 'arm64')
'arm64'
def check_branch(repo, options):

Check if we're on the right branch and bail out otherwise

returns: the current branch or None if in detached head mode

def check_tag(options, repo, source):

Perform specified consistency checks on git history

def clean_working_tree(options, repo):

Clean the working tree.

:param options: Program run-time options, as an `optparse.OptionContainer`. :param repo: The Git repository, as a `DebianGitRepository`. :raise GbpError: When the working tree has uncommitted changes. :return: None.

def disable_hooks(options):

Disable all hooks (except for builder)

def export_source(repo, tree, source, options, dest_dir, tarball_dir):

Export a version of the source tree when building in a separate directory

Parameters
repo:gbp.git.GitRepositorythe git repository to export from
treeUndocumented
sourcethe source package
optionsoptions to apply
dest_dirwhere to export the source to
tarball_dirwhere to fetch the tarball from in overlay mode
Returns
the temporary directory
def get_pbuilder_dist(options, repo, native=False):

Determin the dist to build for with pbuilder/cowbuilder

def main(argv):

Undocumented

def mangle_export_wc_opts(options):

Make building with --export=WC simpler

def maybe_write_tree(repo, options):

Write a tree of the index or working copy if necessary

Parameters
repo:GitRepositorythe git repository we're acting on
optionsUndocumented
Returns
strthe sha1 of the tree
def move_old_export(target):

move a build tree away if it exists

def overlay_extract_origs(source, tarball_dir, dest_dir, options):

Overlay extract orig tarballs to export dir before exporting debian dir from git

def parse_args(argv, prefix):

Undocumented

def prepare_output_dir(dir):

Prepare the directory where the build result will be put

def setup_pbuilder(options, repo, native):

Setup environment variables for git-pbuilder

We return two dictionaries (pbd_env, hook_env) that can be passed as environment when running commands

*pbd_env* is used for the actual build command while *hook_env* is passed to all hooks. They both contain the same information but *pbd_env* contains the depreated variable names not starting with *GBP_*.

def source_vfs(repo, options, tree):

Init source package info either from git or from working copy