class documentation

class UpstreamSource(object):

View In Hierarchy

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

Static Method known_compressions Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method guess_version Undocumented
Method is_dir No summary
Method is_orig No summary
Method pack Recreate a new archive from the current one
Method signaturefile.setter Undocumented
Method unpack Unpack packed upstream sources into a given directory (filtering out files specified by filters) and determine the toplevel of the source tree.
Instance Variable unpacked Undocumented
Property path Undocumented
Property signaturefile 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.
Method _unpack_archive Unpack packed upstream sources into a given directory allowing to filter out files in case of tar archives.
Method _unpack_tar Unpack a tarball to dir applying a list of filters. Leave the cleanup to the caller in case of an error.
Method _unpack_zip Undocumented
Method _unpacked_toplevel unpacked archives can contain a leading directory or not
Class Variable _unpacked path to the unpacked source tree
Instance Variable _orig are the upstream sources already suitable as an upstream tarball
Instance Variable _path path to the upstream sources
Instance Variable _pkg_policy Undocumented
Instance Variable _sig Undocumented
@staticmethod
def known_compressions():

Undocumented

def __init__(self, name, unpacked=None, pkg_policy=PkgPolicy, sig=None):

Undocumented

def __repr__(self):

Undocumented

def guess_version(self, extra_regex=''):

Undocumented

def is_dir(self):
Returns
boolTrue if if upstream sources are an unpacked directory, False otherwise
def is_orig(self):
Returns
boolTrue if sources are suitable as orig tarball, False otherwise
def pack(self, newarchive, filters=None):

Recreate a new archive from the current one

Parameters
newarchive:stringthe name of the new archive
filters:array of stringstar filters to apply
Returns
UpstreamSourcethe new upstream source
@signaturefile.setter
def signaturefile(self, sig):

Undocumented

def unpack(self, dir, filters=None):

Unpack packed upstream sources into a given directory (filtering out files specified by filters) and determine the toplevel of the source tree.

unpacked =

Undocumented

@property
path =

Undocumented

@property
signaturefile =

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.

Returns
boolTrue if upstream source format is suitable as upstream tarball, False otherwise.
def _unpack_archive(self, dir, filters):

Unpack packed upstream sources into a given directory allowing to filter out files in case of tar archives.

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 _unpack_zip(self, dir):

Undocumented

def _unpacked_toplevel(self, dir):

unpacked archives can contain a leading directory or not

_unpacked: string =

path to the unpacked source tree

_orig: boolean =

are the upstream sources already suitable as an upstream tarball

_path: string =

path to the upstream sources

_pkg_policy =

Undocumented

_sig =

Undocumented