gbp.rpm.policy.RpmPkgPolicy(PkgPolicy) class documentationgbp.rpm.policy
(View In Hierarchy)
Packaging policy for RPM
| Class Method | is_valid_orig_archive | Is this a valid orig source archive |
| 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_origs | Check orig tarball and additional tarballs exists in dir |
| Class Method | has_orig | Undocumented |
| Static Method | symlink_origs | symlink orig tarball from orig_dir to output_dir @return: [] if all links were created, list of failed links otherwise |
| Class Method | symlink_orig | Undocumented |
| Class Method | version_subst | Generate a string from a given format and a version. The extracted version can be passed through the sanitizer function argument before being formatted into a string. |
Is this a valid orig source archive
@param filename: upstream source archive filename
@type filename: C{str}
@return: true if valid upstream source archive filename
@rtype: C{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