module documentation

Common functionality for import-orig scripts

Function ask_package_name Ask the user for the source package name.
Function ask_package_version Ask the user for the upstream package version.
Function cleanup_tmp_tree remove a tree of temporary files
Function download_orig Download orig tarball from given URL
Function is_link_target does symlink link already point to target?
Function orig_needs_repack Determine if the upstream sources needs to be repacked
Function repack_upstream Repack the upstream source tree
Function repacked_tarball_name Undocumented
def ask_package_name(default, name_validator_func, err_msg):

Ask the user for the source package name.

Parameters
defaultThe default package name to suggest to the user.
name_validator_funcUndocumented
err_msgUndocumented
def ask_package_version(default, ver_validator_func, err_msg):

Ask the user for the upstream package version.

Parameters
defaultThe default package version to suggest to the user.
ver_validator_funcUndocumented
err_msgUndocumented
def cleanup_tmp_tree(tree):

remove a tree of temporary files

def download_orig(url):

Download orig tarball from given URL

Parameters
url:strthe download URL
Returns
DebianUpstreamSourceThe upstream source tarball
Raises
GbpErroron all errors
def is_link_target(target, link):

does symlink link already point to target?

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 repack_upstream(upstream, name, version, tmpdir, filters):

Repack the upstream source tree

def repacked_tarball_name(upstream, name, version):

Undocumented