def apply_deb_tgz(deb_tgz): """Apply .debian.tar.gz (V3 source format)""" # Remove any existing data in debian/ as dpkg-source -x does if os.path.isdir('debian'): shutil.rmtree('debian') gbpc.UnpackTarArchive(deb_tgz, ".")() return True
def _unpack_tar(self, dir, filters): """ Unpack a tarball to I{dir} applying a list of I{filters}. Leave the cleanup to the caller in case of an error. """ try: unpackArchive = gbpc.UnpackTarArchive(self.path, dir, filters) unpackArchive() except gbpc.CommandExecFailed: # unpackArchive already printed an error message raise GbpError