Common functionality for import-orig scripts

Function orig_needs_repack Determine if the upstream sources needs to be repacked
Function cleanup_tmp_tree remove a tree of temporary files
Function is_link_target does symlink link already point to target?
Function ask_package_name Ask the user for the source package name. @param default: The default package name to suggest to the user.
Function ask_package_version Ask the user for the upstream package version. @param default: The default package version to suggest to the user.
Function repacked_tarball_name Undocumented
Function repack_upstream Repack the upstream source tree
Function download_orig No summary
def orig_needs_repack(upstream_source, options):

Determine if the upstream sources needs to be repacked

We repack if

  1. we want to filter out files via filters or post-unpack script and use pristine tar since we want to make a filtered tarball available to pristine-tar
  2. we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) and want to use filters
  3. we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) and want to use pristine-tar
  4. we don't have a suitable upstream tarball (e.g. zip archive or unpacked dir) and want to use a post-unpack script
def cleanup_tmp_tree(tree):

remove a tree of temporary files

def is_link_target(target, link):

does symlink link already point to target?

def ask_package_name(default, name_validator_func, err_msg):

Ask the user for the source package name.

ParametersdefaultThe default package name to suggest to the user.
def ask_package_version(default, ver_validator_func, err_msg):

Ask the user for the upstream package version.

ParametersdefaultThe default package version to suggest to the user.
def repacked_tarball_name(upstream, name, version):
Undocumented
def repack_upstream(upstream, name, version, tmpdir, filters):

Repack the upstream source tree

def download_orig(url):

Download orig tarball from given URL

Parametersurlthe download URL (type: str)
ReturnsThe upstream source tarball (type: DebianUpstreamSource)
RaisesGbpErroron all errors
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.