Package gbp :: Package pkg :: Class UpstreamSource
[hide private]
[frames] | no frames]

Class UpstreamSource

object --+
         |
        UpstreamSource
Known Subclasses:

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

Instance Methods [hide private]
 
__init__(self, name, unpacked=None, pkg_policy=<class 'gbp.pkg.PkgPolicy'>)
x.__init__(...) initializes x; see help(type(x)) for signature
bool
_check_orig(self)
Check if upstream source format can be used as orig tarball.
bool
is_orig(self)
Returns: True if sources are suitable as orig tarball, False otherwise
bool
is_dir(self)
Returns: True if if upstream sources are an unpacked directory, False otherwise
 
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.
 
_unpack_archive(self, dir, filters)
Unpack packed upstream sources into a given directory allowing to filter out files in case of tar archives.
 
_unpack_zip(self, dir)
 
_unpacked_toplevel(self, dir)
unpacked archives can contain a leading directory or not
 
_unpack_tar(self, dir, filters)
Unpack a tarball to dir applying a list of filters.
UpstreamSource
pack(self, newarchive, filters=None)
Recreate a new archive from the current one
 
guess_version(self, extra_regex='')

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
known_compressions()
Class Variables [hide private]
boolean _orig
are the upstream sources already suitable as an upstream tarball
string _path
path to the upstream sources
string _unpacked
path to the unpacked source tree
Properties [hide private]
  path

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, unpacked=None, pkg_policy=<class 'gbp.pkg.PkgPolicy'>)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_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: bool
True if upstream source format is suitable as upstream tarball, False otherwise.

is_orig(self)

 
Returns: bool
True if sources are suitable as orig tarball, False otherwise

is_dir(self)

 
Returns: bool
True if if upstream sources are an unpacked directory, False otherwise

_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.

pack(self, newarchive, filters=None)

 

Recreate a new archive from the current one

Parameters:
  • newarchive (string) - the name of the new archive
  • filters (array of strings) - tar filters to apply
Returns: UpstreamSource
the new upstream source

Property Details [hide private]

path

Get Method:
unreachable.path(self)