def _p_to_cp(p):
    ret = _porttree().dbapi.xmatch("match-all", p)
    if ret:
        return portage.cpv_getkey(ret[0])
    return None
Convert a package name or a DEPEND atom to category/package format.
dataset/ETHPy150Open saltstack/salt/salt/modules/portage_config.py/_p_to_cp