Known subclasses: gbp.deb.upstreamsource.DebianUpstreamSource

Upstream source. Can be either an unpacked dir, a tarball or another type of archive

Method __init__ Undocumented
Instance Variable unpacked Undocumented
Method is_orig
Method is_tarball
Method is_dir
Method path Undocumented
Method archive_fmt Archive format of the sources, e.g. 'tar'
Method compression Compression format of the sources, e.g. 'gzip'
Method prefix Prefix, i.e. the 'leading directory name' of the sources
Method unpack Unpack packed upstream sources into a given directory and determine the toplevel of the source tree.
Method pack Recreate a new archive from the current one
Static Method known_compressions Undocumented
Method guess_version Undocumented
Instance Variable _orig are the upstream sources already suitable as an upstream tarball
Instance Variable _path path to the upstream sources
Class Variable _unpacked path to the unpacked source tree
Instance Variable _tarball Undocumented
Instance Variable _pkg_policy Undocumented
Instance Variable _prefix Undocumented
Method _check_orig Check if upstream source format can be used as orig tarball. This doesn't imply that the tarball is correctly named.
Static Method _get_topdir_files Parse content of the top directory from a file list
Method _determine_prefix Determine the prefix, i.e. the "leading directory name
Method _unpack_archive Unpack packed upstream sources into a given directory. Return True if the output was filtered, otherwise False.
Method _unpack_zip Undocumented
Method _unpack_tar Unpack a tarball to dir applying a list of filters. Leave the cleanup to the caller in case of an error.
_orig =
are the upstream sources already suitable as an upstream tarball
(type: boolean)
_path =
path to the upstream sources
(type: string)
_unpacked =
path to the unpacked source tree
(type: string)
def __init__(self, name, unpacked=None, pkg_policy=PkgPolicy, prefix=None):
Undocumented
_tarball =
Undocumented
_pkg_policy =
Undocumented
unpacked =
Undocumented
_prefix =
Undocumented
def _check_orig(self):

Check if upstream source format can be used as orig tarball. This doesn't imply that the tarball is correctly named.

ReturnsTrue if upstream source format is suitable as upstream tarball, False otherwise. (type: bool)
def is_orig(self):
ReturnsTrue if sources are suitable as upstream source, False otherwise (type: bool)
def is_tarball(self):
ReturnsTrue if source is a tarball, False otherwise (type: bool)
def is_dir(self):
ReturnsTrue if if upstream sources are an unpacked directory, False otherwise (type: bool)
@property
def path(self):
Undocumented
@staticmethod
def _get_topdir_files(file_list):

Parse content of the top directory from a file list

>>> UpstreamSource._get_topdir_files([])
set([])
>>> UpstreamSource._get_topdir_files([('-', 'foo/bar')])
set([('d', 'foo')])
>>> UpstreamSource._get_topdir_files([('d', 'foo/'), ('-', 'foo/bar')])
set([('d', 'foo')])
>>> UpstreamSource._get_topdir_files([('d', 'foo'), ('-', 'foo/bar')])
set([('d', 'foo')])
>>> UpstreamSource._get_topdir_files([('-', 'fob'), ('d', 'foo'), ('d', 'foo/bar'), ('-', 'foo/bar/baz')])
set([('-', 'fob'), ('d', 'foo')])
>>> UpstreamSource._get_topdir_files([('-', './foo/bar')])
set([('d', 'foo')])
>>> UpstreamSource._get_topdir_files([('-', 'foo/bar'), ('-', '.foo/bar')])
set([('d', '.foo'), ('d', 'foo')])
def _determine_prefix(self):

Determine the prefix, i.e. the "leading directory name

@property
def archive_fmt(self):

Archive format of the sources, e.g. 'tar'

@property
def compression(self):

Compression format of the sources, e.g. 'gzip'

@property
def prefix(self):

Prefix, i.e. the 'leading directory name' of the sources

def unpack(self, dir, filters=[]):

Unpack packed upstream sources into a given directory and determine the toplevel of the source tree.

def _unpack_archive(self, dir, filters):

Unpack packed upstream sources into a given directory. Return True if the output was filtered, otherwise False.

def _unpack_zip(self, dir):
Undocumented
def _unpack_tar(self, dir, filters):

Unpack a tarball to dir applying a list of filters. Leave the cleanup to the caller in case of an error.

def pack(self, newarchive, filters=[], newprefix=None):

Recreate a new archive from the current one

Parametersnewarchivethe name of the new archive (type: string)
filterstar filters to apply (type: array of strings)
newprefixnew prefix, None implies that prefix is not mangled (type: string or None)
Returnsthe new upstream source (type: UpstreamSource)
@staticmethod
def known_compressions():
Undocumented
def guess_version(self, extra_regex=""""""):
Undocumented
API Documentation for git-buildpackage, generated by pydoctor at 2021-05-14 08:50:00.