gbp.deb.policy.DebianPkgPolicy(PkgPolicy)
class documentationgbp.deb.policy
(View In Hierarchy)
Packaging policy for Debian Source Packages
>>> DebianPkgPolicy.is_valid_upstreamversion('1:9.8.4.dfsg.P1-6') True >>> DebianPkgPolicy.is_valid_upstreamversion('-1') False
Class Variable | packagename_re | Undocumented |
Class Variable | packagename_msg | Undocumented |
Class Variable | upstreamversion_re | Undocumented |
Class Variable | upstreamversion_msg | Undocumented |
Class Variable | debianversion_chars | Undocumented |
Static Method | build_tarball_name | Given a source package's name, version and compression return the name of the corresponding upstream tarball. |
Inherited from PkgPolicy:
Class Method | is_valid_packagename | Is this a valid package name? |
Class Method | is_valid_upstreamversion | Is this a valid upstream version number? |
Class Method | is_valid_orig_archive | Is this a valid orig source archive |
Static Method | guess_upstream_src_version | Guess the package name and version from the filename of an upstream archive. |
Static Method | has_orig | Check if orig tarball exists in dir |
Static Method | symlink_orig | symlink orig tarball from orig_dir to output_dir @return: True if link was created or src == dst False in case of error or src doesn't exist |
Given a source package's name, version and compression return the name of the corresponding upstream tarball.
>>> DebianPkgPolicy.build_tarball_name('foo', '1.0', 'bzip2') 'foo_1.0.orig.tar.bz2' >>> DebianPkgPolicy.build_tarball_name('bar', '0.0~git1234', 'xz') 'bar_0.0~git1234.orig.tar.xz'
Parameters | name | the source package's name (type: str ) |
version | the upstream version (type: str ) | |
compression | the desired compression (type: str ) | |
dir | a directory to prepend (type: str ) | |
Returns | the tarballs name corresponding to the input parameters (type: str ) |