def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False): """Accumulate PiSi XML files in a directory, and write an index.""" index = pisi.index.Index() index.distribution = None if not dirs: dirs = ['.'] for repo_dir in dirs: repo_dir = str(repo_dir) ctx.ui.info(_('* Building index of PiSi files under %s') % repo_dir) index.index(repo_dir, skip_sources) if skip_signing: index.write(output, sha1sum=True, compress=pisi.file.File.bz2, sign=None) else: index.write(output, sha1sum=True, compress=pisi.file.File.bz2, sign=pisi.file.File.detached) ctx.ui.info(_('* Index file written'))
def index(dirs=None, output="pisi-index.xml", skip_sources=False, skip_signing=False, compression=0): """Accumulate PiSi XML files in a directory, and write an index.""" index = pisi.index.Index() index.distribution = None if not dirs: dirs = ["."] for repo_dir in dirs: repo_dir = str(repo_dir) ctx.ui.info(_("Building index of PiSi files under %s") % repo_dir) index.index(repo_dir, skip_sources) sign = None if skip_signing else pisi.file.File.detached index.write(output, sha1sum=True, compress=compression, sign=sign) ctx.ui.info(_("Index file written"))
def index(dirs=None, output='eopkg-index.xml', skip_sources=False, skip_signing=False, compression=0): """Accumulate eopkg XML files in a directory, and write an index.""" index = pisi.index.Index() index.distribution = None if not dirs: dirs = ['.'] for repo_dir in dirs: repo_dir = str(repo_dir) ctx.ui.info(_('Building index of eopkg files under %s') % repo_dir) index.index(repo_dir, skip_sources) sign = None if skip_signing else pisi.file.File.detached index.write(output, sha1sum=True, compress=compression, sign=sign) ctx.ui.info(_('Index file written'))