Exemplo n.º 1
0
def download(options):
    if options.minimal:
        for package_name, _ in which_packages:
            iatidq.dqdownload.run(package_name=package_name)
    elif options.matching:
        for pkg_name in dqregistry.matching_packages(options.matching):
            iatidq.dqdownload.run(package_name=pkg_name)
    else:
        iatidq.dqdownload.run()
Exemplo n.º 2
0
def refresh(options):
    pkg_names = None
    if options.package_name:
        pkg_names = [options.package_name]
    elif options.minimal:
        pkg_names = [i[0] for i in which_packages]
    elif options.matching:
        pkg_names = [i for i in dqregistry.matching_packages(options.matching)]

    if pkg_names is not None:
        [ dqregistry.refresh_package_by_name(name) for name in pkg_names ]
    else:
        dqregistry.refresh_packages()
Exemplo n.º 3
0
def activate_packages(options):
    if options.matching:
        which_packages = [(i, True) 
                          for i in dqregistry.matching_packages(
                options.matching)]
    dqregistry.activate_packages(which_packages, clear_revision_id=True)