gbp.rpm.policy.RpmPkgPolicy(PkgPolicy)
class documentationgbp.rpm.policy
(View In Hierarchy)
Packaging policy for RPM
Class Variable | python_rpmlib_module_name | Undocumented |
Class Variable | alnum | Undocumented |
Class Variable | name_whitelist_chars | Undocumented |
Class Variable | version_whitelist_chars | Undocumented |
Class Variable | packagename_re | Undocumented |
Class Variable | packagename_msg | Undocumented |
Class Variable | upstreamversion_re | Undocumented |
Class Variable | upstreamversion_msg | Undocumented |
Class Variable | tag_timestamp_format | Undocumented |
Class Method | is_valid_orig_archive | Is this a valid orig source archive |
Class Method | split_full_version | Parse full version string and split it into individual "version components", i.e. upstreamversion, epoch and release |
Class Method | compose_full_version | Compose a full version string from individual "version components", i.e. epoch, version and release |
Class | Changelog | Container for changelog related policy settings |
Class | ChangelogEntryFormatter | Helper class for generating changelog entries from git commits |
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? |
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 |
Is this a valid orig source archive
Parameters | filename | upstream source archive filename (type: str ) |
Returns | true if valid upstream source archive filename (type: bool >>> RpmPkgPolicy.is_valid_orig_archive("foo/bar_baz.tar.gz") True >>> RpmPkgPolicy.is_valid_orig_archive("foo.bar.tar") True >>> RpmPkgPolicy.is_valid_orig_archive("foo.bar") False >>> RpmPkgPolicy.is_valid_orig_archive("foo.gz") False) |
Parse full version string and split it into individual "version components", i.e. upstreamversion, epoch and release
Parameters | version | full version of a package (type: str ) |
Returns | individual version components (type: dict >>> RpmPkgPolicy.split_full_version("1") {'release': None, 'epoch': None, 'upstreamversion': '1'} >>> RpmPkgPolicy.split_full_version("1.2.3-5.3") {'release': '5.3', 'epoch': None, 'upstreamversion': '1.2.3'} >>> RpmPkgPolicy.split_full_version("3:1.2.3") {'release': None, 'epoch': '3', 'upstreamversion': '1.2.3'} >>> RpmPkgPolicy.split_full_version("3:1-0") {'release': '0', 'epoch': '3', 'upstreamversion': '1'}) |
Compose a full version string from individual "version components", i.e. epoch, version and release
Parameters | evr | dict of version components (type: dict of str ) |
Returns | full version (type: str >>> RpmPkgPolicy.compose_full_version({'epoch': '', 'upstreamversion': '1.0'}) '1.0' >>> RpmPkgPolicy.compose_full_version({'epoch': '2', 'upstreamversion': '1.0', 'release': None}) '2:1.0' >>> RpmPkgPolicy.compose_full_version({'epoch': None, 'upstreamversion': '1', 'release': '0'}) '1-0' >>> RpmPkgPolicy.compose_full_version({'epoch': '2', 'upstreamversion': '1.0', 'release': '2.3'}) '2:1.0-2.3' >>> RpmPkgPolicy.compose_full_version({'epoch': '2', 'upstreamversion': '', 'release': '2.3'})) |