def origin_potentials(apiurl, target_project, package): potentials = {} config = config_load(apiurl, target_project) for origin, _ in config_origin_generator(config['origins'], apiurl, target_project, package, True): version = package_version(apiurl, origin, package) if version is not False: # Package exists in origin, but may still have unknown version. potentials[origin] = version return potentials
def origin_potential(apiurl, target_project, package, require_update_initial=False): config = config_load(apiurl, target_project) for origin, _ in config_origin_generator(config['origins'], apiurl, target_project, package, True): version = package_version(apiurl, origin, package) if version is not False: if require_update_initial: policy = policy_get(apiurl, target_project, package, origin) if not policy['automatic_updates_initial']: continue # Package exists in origin, but may still have unknown version. return origin, version return None, None