Package gbp :: Package scripts :: Module import_orig
[hide private]
[frames] | no frames]

Module import_orig

Import a new upstream version into a Git repository

Classes [hide private]
  RollbackError
An error raised if the actual rollback failed
  ImportOrigDebianGitRepository
Like a DebianGitRepository but can also perform rollbacks and knows about some of the inner workings upstream vcs_tag, …
Functions [hide private]
str
prepare_pristine_tar(archive, pkg, version)
Prepare the upstream source for pristine tar import.
 
upstream_import_commit_msg(options, version)
 
detect_name_and_version(repo, source, options)
string
find_source(use_uscan, args)
Find the main tarball to import - either via uscan or via command line argument
 
debian_branch_merge(repo, tag, version, options)
 
postimport_hook(repo, tag, version, options)
 
is_30_quilt(repo, options)
 
debian_branch_merge_by_auto(repo, tag, version, options)
 
debian_branch_merge_by_replace(repo, tag, version, options)
 
debian_branch_merge_by_merge(repo, tag, version, options)
 
unpack_tarballs(sourcepackage, source, version, component_tarballs, options)
 
set_bare_repo_options(options)
Modify options for import into a bare repository
 
build_parser(name)
 
parse_args(argv)
Parse the command line arguments
 
main(argv)
Variables [hide private]
  __package__ = 'gbp.scripts'
Function Details [hide private]

prepare_pristine_tar(archive, pkg, version)

 

Prepare the upstream source for pristine tar import.

This checks if the upstream source is actually a tarball and creates a symlink from archive to <pkg>_<version>.orig.tar.<ext> so pristine-tar will see the correct basename.

Parameters:
  • archive (str) - the upstream source's name
  • pkg (str) - the source package's name
  • version (str) - the upstream version number
Returns: str

find_source(use_uscan, args)

 

Find the main tarball to import - either via uscan or via command line argument

Returns: string
upstream source filename or None if nothing to import
Raises:
  • GbpError - raised on all detected errors
    >>> find_source(False, ['too', 'many'])
    Traceback (most recent call last):
    ...
    GbpError: More than one archive specified. Try --help.
    >>> find_source(False, [])
    Traceback (most recent call last):
    ...
    GbpError: No archive to import specified. Try --help.
    >>> find_source(True, ['tarball'])
    Traceback (most recent call last):
    ...
    GbpError: you can't pass both --uscan and a filename.
    >>> find_source(False, ['tarball']).path
    'tarball'

parse_args(argv)

 

Parse the command line arguments

Returns:
options and arguments