@staticmethod
def zip_packages(packagesfile, content=None):
    """
        根据Packages生成Packages.gz,Packages.bz2
        """
    if not content:
        with open(packagesfile, 'rb') as f:
            content = f.read()
    import gzip
    zfile = gzip.open(packagesfile + '.gz', mode='wb')
    zfile.write(content)
    zfile.close()
    import bz2
    bzfile = bz2.BZ2File(packagesfile + '.bz2', 'wb')
    bzfile.write(content)
    bzfile.close()
    return
