Beispiel #1
0
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'))
Beispiel #2
0
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"))
Beispiel #3
0
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'))
Beispiel #4
0
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'))
Beispiel #5
0
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'))