'Extract the fetched compressed .tar or .zip within its directory.'

def _extract_compressed_package(self):

    if (not self.verified_package):
        raise Error('Package    must    have    been    fetched    first.')
    os.chdir(os.path.dirname(self.verified_package))
    if self.verified_package.endswith('gz'):
        status = system(("tar    -xzf    '%s'" % self.verified_package))
    elif self.verified_package.endswith('bz2'):
        status = system(("tar    -xjf    '%s'" % self.verified_package))
    elif self.verified_package.endswith('zip'):
        status = system(("unzip    '%s'" % self.verified_package))
    else:
        raise Error(('Unknown    compression    suffix    on    %s.' % self.verified_package))
    if status:
        raise Error(('tar    failed    with    %s' % (status,)))
