# `gbp.pkg.pristinetar.PristineTar(Command)` class documentation

Part of `gbp.pkg.pristinetar` (View In Hierarchy)

Known subclasses: gbp.deb.pristinetar.DebianPristineTar

The pristine-tar branch in a git repository

Method | __init__ | Undocumented
Method | has_feature_verify | Undocumented
Method | has_commit | Do we have a pristine-tar commit for a package matching archive_regexp.
Method | get_commit | Get the pristine-tar commit of a package matching archive_regexp.
Method | checkout | Checkout an orig archive from pristine-tar branch
Method | commit | Commit an archive archive to the pristine tar branch using upstream branch ${upstream}.
Method | verify | Verify an archive's archive checksum using to the pristine tar branch
Method | _has_feature | Check if pristine_tar has a certain feature enabled.

Inherited from Command:

Method | __call__ | Run the command and raise exception on errors
Method | call | Like `__call__` but let the caller handle the return status.
Static Method | _f | Build error string template
Method | _reset_state | Undocumented
Method | __call | Wraps subprocess.call so we can be verbose and fix Python's SIGPIPE handling
Method | _log_err | Log an error message
Method | _format_err | Log an error message

def __init__(self, repo):
overrides gbp.command_wrappers.Command.__init__
Undocumented
def _has_feature(self, feature):

Check if pristine_tar has a certain feature enabled.

Parameters | feature | feature / command option to check (type: `str`)
Returns | True if feature is supported (type: `bool`)

def has_feature_verify(self):
Undocumented
def has_commit(self, archive_regexp):
overridden in gbp.deb.pristinetar.DebianPristineTar

Do we have a pristine-tar commit for a package matching archive_regexp.

Parameters | archive_regexp | archive name to look for (regexp wildcards allowed) (type: `str`)

def get_commit(self, archive_regexp):

Get the pristine-tar commit of a package matching archive_regexp.

Parameters | archive_regexp | archive name to look for (regexp wildcards allowed) (type: `str`)

def checkout(self, archive, quiet=False):
overridden in gbp.deb.pristinetar.DebianPristineTar

Checkout an orig archive from pristine-tar branch

Parameters | archive | the name of the orig archive (type: `str`)

def commit(self, archive, upstream, quiet=False):

Commit an archive archive to the pristine tar branch using upstream branch ${upstream}.

Parameters | archive | the archive to commit (type: `str`)
| upstream | the upstream branch to diff against (type: `str`)

def verify(self, archive, quiet=False):

Verify an archive's archive checksum using to the pristine tar branch