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

Module buildpackage

Common functionality for Debian and RPM buildpackage scripts

Functions [hide private]
 
sanitize_prefix(prefix)
Sanitize the prefix used for generating source archives
 
git_archive_submodules(repo, treeish, output, prefix, comp_type, comp_level, comp_opts, format='tar')
Create a source tree archive with submodules.
 
git_archive_single(treeish, output, prefix, comp_type, comp_level, comp_opts, format='tar')
Create an archive without submodules
    Functions to handle export-dir
 
dump_tree(repo, export_dir, treeish, with_submodules, recursive=True)
dump a tree to output_dir
 
write_wc(repo, force=True)
write out the current working copy as a treeish object
 
drop_index()
drop our custom index
Variables [hide private]
  index_name = 'INDEX'
  wc_name = 'WC'
  wc_index = '.git/gbp_index'
  __package__ = 'gbp.scripts.common'
Function Details [hide private]

sanitize_prefix(prefix)

 

Sanitize the prefix used for generating source archives

>>> sanitize_prefix('')
'/'
>>> sanitize_prefix('foo/')
'foo/'
>>> sanitize_prefix('/foo/bar')
'foo/bar/'

git_archive_submodules(repo, treeish, output, prefix, comp_type, comp_level, comp_opts, format='tar')

 

Create a source tree archive with submodules.

Concatenates the archives generated by git-archive into one and compresses the end result.

Exception handling is left to the caller.

git_archive_single(treeish, output, prefix, comp_type, comp_level, comp_opts, format='tar')

 

Create an archive without submodules

Exception handling is left to the caller.