gbp.pkg
package documentationgbp
Common functionality of the Debian/RPM package helpers
Module | pristinetar | Handle checkin and checkout of archives from the pristine-tar branch |
From the __init__.py
module:
Class | PkgPolicy | Common helpers for packaging policy. |
Class | UpstreamSource | Upstream source. Can be either an unpacked dir, a tarball or another type of archive |
Variable | archive_ext_aliases | Undocumented |
Variable | archive_formats | Undocumented |
Variable | compressor_aliases | Undocumented |
Variable | compressor_opts | Undocumented |
Function | parse_archive_filename | Given an filename return the basename (i.e. filename without the archive and compression extensions), archive format and compression method used. |
Given an filename return the basename (i.e. filename without the archive and compression extensions), archive format and compression method used.
Parameters | filename | the name of the file (type: string) |
Returns | tuple containing basename, archive format and compression method (type: tuple of str >>> parse_archive_filename("abc.tar.gz") ('abc', 'tar', 'gzip') >>> parse_archive_filename("abc.tar.bz2") ('abc', 'tar', 'bzip2') >>> parse_archive_filename("abc.def.tbz2") ('abc.def', 'tar', 'bzip2') >>> parse_archive_filename("abc.def.tar.xz") ('abc.def', 'tar', 'xz') >>> parse_archive_filename("abc.zip") ('abc', 'zip', None) >>> parse_archive_filename("abc.lzma") ('abc', None, 'lzma') >>> parse_archive_filename("abc.tar.foo") ('abc.tar.foo', None, None) >>> parse_archive_filename("abc") ('abc', None, None)) |