def _p_to_cp(p):
    ret = _porttree().dbapi.xmatch("match-all", p)
    if ret:
        return portage.cpv_getkey(ret[0])
    return None
Return an iterator that yields the ID of every element while
dataset/ETHPy150Open saltstack/salt/salt/modules/portage_config.py/_p_to_cp--crossover with--dataset/ETHPy150Open conceptsandtraining/libtree/libtree/core/query.py/get_ancestor_ids