Common functionality for import-orig scripts

Function cleanup_tmp_tree remove a tree of temporary files
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 prepare_sources Prepare upstream sources for importing
Function prepare_pristine_tar Prepare the upstream sources for pristine-tar import
def cleanup_tmp_tree(tree):

remove a tree of temporary files

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 prepare_sources(source, pkg_name, pkg_version, pristine_commit_name, filters, filter_pristine, prefix, tmpdir):

Prepare upstream sources for importing

Unpack, filter and repack sources for importing to git and to pristine-tar.

Parameterssourceoriginal upstream sources (type: UpstreamSource)
pkg_namepackage name (type: str)
pkg_versionupstream version of the package (type: str)
pristine_commit_namearchive filename to commit to pristine-tar (type: str or None)
filtersfilter to exclude files (type: list of str)
filter_pristinefilter pristine-tar, too (type: bool)
prefixprefix (i.e. leading directory of files) to use in pristine-tar, set to None to not mangle orig archive (type: str or None)
tmpdirtemporary working dir (cleanup left to caller) (type: str)
Returnspath to prepared source tree and tarball to commit to pristine-tar (type: tuple of str)
def prepare_pristine_tar(source, pkg_name, pkg_version, pristine_commit_name, filters=None, prefix=None, tmpdir=None):

Prepare the upstream sources for pristine-tar import

Parameterssourceoriginal upstream sources (type: UpstreamSource)
pkg_namepackage name (type: str)
pkg_versionupstream version of the package (type: str)
pristine_commit_namearchive filename to commit to pristine-tar (type: str or None)
filtersfilter to exclude files (type: list of str or None)
prefixprefix (i.e. leading directory of files) to use in pristine-tar, set to None to not mangle orig archive (type: str or None)
tmpdirtemporary working dir (cleanup left to caller) (type: str)
Returnsprepared source archive (type: UpstreamSource)
API Documentation for git-buildpackage, generated by pydoctor at 2020-05-22 08:50:00.