コード例 #1
0
def pes_events_scanner(pes_json_directory, pes_json_filename):
    """Entrypoint to the library"""
    installed_pkgs = get_installed_pkgs()
    transaction_configuration = get_transaction_configuration()
    arch = api.current_actor().configuration.architecture
    events = get_events(pes_json_directory, pes_json_filename)
    releases = get_releases(events)
    target = version._version_to_tuple(api.current_actor().configuration.version.target)

    filtered_releases = filter_releases_by_target(releases, target)
    filtered_events = filter_events_by_releases(events, filtered_releases)
    arch_events = filter_events_by_architecture(filtered_events, arch)

    add_output_pkgs_to_transaction_conf(transaction_configuration, arch_events)
    drop_conflicting_release_events(arch_events)
    tasks = process_events(filtered_releases, arch_events, installed_pkgs)
    filter_out_transaction_conf_pkgs(tasks, transaction_configuration)
    produce_messages(tasks)
コード例 #2
0
def test_version_to_tuple():
    assert version._version_to_tuple('7.6') == (7, 6)