Build a Debian package out of a Git repository
Function | maybe_write_tree | Write a tree of the index or working copy if necessary |
Function | export_source | Export a version of the source tree when building in a separate directory |
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 | source_vfs | Init source package info either from git or from working copy |
Function | prepare_output_dir | Prepare the directory where the build result will be put |
Function | clean_working_tree | Clean the working tree. |
Function | check_tag | Perform specified consistency checks on git history |
Function | get_pbuilder_dist | Determin the dist to build for with pbuilder/cowbuilder |
Function | setup_pbuilder | Setup environment variables for git-pbuilder |
Function | mangle_export_wc_opts | Make building with --export=WC simpler |
Function | disable_hooks | Disable all hooks (except for builder) |
Function | changes_file_suffix | No summary |
Function | changes_file_name | Undocumented |
Function | check_branch | Check if we're on the right branch and bail out otherwise |
Function | build_parser | Undocumented |
Function | parse_args | Undocumented |
Function | main | Undocumented |
Write a tree of the index or working copy if necessary
Parameters | repo | the git repository we're acting on (type: GitRepository ) |
Returns | the sha1 of the tree (type: str ) |
Export a version of the source tree when building in a separate directory
Parameters | repo | the git repository to export from (type: gbp.git.GitRepository ) |
source | the source package | |
options | options to apply | |
dest_dir | where to export the source to | |
tarball_dir | where to fetch the tarball from in overlay mode | |
Returns | the temporary directory |
Overlay extract orig tarballs to export dir before exporting debian dir from git
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.
Determin the dist to build for with pbuilder/cowbuilder
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_*.
>>> 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'