At the time we've been searching for the pkg in a repo, no repos were registered resulting in EINVAL. While here, if there's no declared repos return ENOENT instead.