Package gbp :: Module deb :: 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 or archive

Instance Methods [hide private]
 
__init__(self, name, unpacked=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_check_orig(self)
Check if archive can be used as orig tarball
 
unpack(self, dir, filters=[])
Unpack packed upstream sources into a given directory and determine the toplevel of the source tree.
 
_unpack_archive(self, dir, filters)
Unpack packed upstream sources into a given directory.
 
_unpack_zip(self, dir)
 
_unpacked_toplevel(self, dir)
unpacked archives can contain a leading directory not
 
_unpack_tar(self, dir, filters)
unpack a .orig.tar.gz to tmpdir, leave the cleanup to the caller in case of an error
UpstreamSource
pack(self, newarchive, filters=[])
recreate a new archive from the current one
 
guess_version(self, extra_regex='')
Guess the package name and version from the filename of an upstream archive.

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]
  _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
boolean is_dir
are the upstream sources an unpacked dir
Properties [hide private]
  is_orig
  path

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, unpacked=None)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

pack(self, newarchive, filters=[])

 

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

guess_version(self, extra_regex='')

 

Guess the package name and version from the filename of an upstream archive.

Parameters:
  • extra_regex - additional regex to apply, needs a 'package' and a 'version' group

Property Details [hide private]

is_orig

Get Method:
unreachable.is_orig(self)

path

Get Method:
unreachable.path(self)