Package gbp :: Package scripts :: Module buildpackage

[hide private]
[frames] | no frames]

# Module buildpackage

run commands to build a debian package out of a git repository

Functions | [hide private]

git_archive(repo, cp, output_dir, treeish, comp_type, comp_level, with_submodules) create a compressed orig tarball in output_dir using git_archive |

prepare_upstream_tarball(repo, cp, options, tarball_dir, output_dir) Make sure we have an upstream tarball. |

source_vfs(repo, options, tree) Init source package info either from git or from working copy |

prepare_output_dir(dir) Prepare the directory where the build result will be put |

pristine_tar_build_orig(repo, cp, output_dir, options) build orig using pristine-tar |

get_upstream_tree(repo, cp, options) Determine the upstream tree from the given options |

`str`

git_archive_build_orig(repo, cp, output_dir, options) Build orig tarball using git-archive |

guess_comp_type(repo, comp_type, cp, tarball_dir) Guess compression type |

setup_pbuilder(options) setup everything to use git-pbuilder |

disable_hooks(options) Disable all hooks (except for builder) |

changes_file_suffix(dpkg_args) |

parse_args(argv, prefix) |

main(argv) |

Functions to handle export-dir

`str`

write_tree(repo, options) Write a tree of the index or working copy if necessary |

export_source(repo, tree, source, options, dest_dir, tarball_dir) Export a version of the source tree when building in a separate directory |

move_old_export(target) move a build tree away if it exists |

extract_orig(orig_tarball, dest_dir) extract orig tarball to export dir before exporting from git |

Variables | [hide private]

| __package__ = ``'``gbp.scripts``'``

Function Details | [hide private]

### prepare_upstream_tarball(repo, cp, options, tarball_dir, output_dir)

Make sure we have an upstream tarball. This involves loooking in tarball_dir, symlinking or building it.

### write_tree(repo, options)

Write a tree of the index or working copy if necessary

Parameters:
  - `repo` (GitRepository) - the git repository we're acting on
Returns: `str`
  the sha1 of the tree

### 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.GitRepository) - the git repository to export from
  - `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

### pristine_tar_build_orig(repo, cp, output_dir, options)

build orig using pristine-tar

Returns:
  True: orig tarball build, False: noop

### git_archive_build_orig(repo, cp, output_dir, options)

Build orig tarball using git-archive

Parameters:
  - `cp` (ChangeLog) - the changelog of the package we're acting on
  - `output_dir` (`Str`) - where to put the tarball
  - `options` (`dict` of options) - the parsed options
Returns: `str`
  the tree we built the tarball from