Package gbp :: Package deb
[hide private]
[frames] | no frames]

Package deb

provides some debian source package related helpers

Submodules [hide private]

Classes [hide private]
  DebianPkgPolicy
Packaging policy for Debian
  DpkgCompareVersions
  DscFile
Keeps all needed data read from a dscfile
Functions [hide private]
 
parse_dsc(dscfile)
parse dsc by creating a DscFile object
 
parse_changelog_repo(repo, branch, filename)
Parse the changelog file from given branch in the git repository.
 
orig_file(cp, compression)
The name of the orig file belonging to changelog cp
tuple
parse_uscan(out)
Parse the uscan output return (True, tarball) if a new version was downloaded and could be located.
 
do_uscan()
invoke uscan to fetch a new upstream version
 
get_arch()
 
compare_versions(version1, version2)
compares to Debian versionnumbers suitable for sort()
Variables [hide private]
  debian_version_chars = 'a-zA-Z\\d.~+-'
  __package__ = 'gbp.deb'
Function Details [hide private]

orig_file(cp, compression)

 

The name of the orig file belonging to changelog cp

>>> orig_file({'Source': 'foo', 'Upstream-Version': '1.0'}, "bzip2")
'foo_1.0.orig.tar.bz2'
>>> orig_file({'Source': 'bar', 'Upstream-Version': '0.0~git1234'}, "xz")
'bar_0.0~git1234.orig.tar.xz'

parse_uscan(out)

 

Parse the uscan output return (True, tarball) if a new version was downloaded and could be located. If the tarball can't be located it returns (True, None). Returns (False, None) if the current version is up to date.

>>> parse_uscan("<status>up to date</status>")
(False, None)
>>> parse_uscan("<target>virt-viewer_0.4.0.orig.tar.gz</target>")
(True, '../virt-viewer_0.4.0.orig.tar.gz')
Parameters:
  • out (string) - uscan output
Returns: tuple
status and tarball name