xbps_dictionary_t xbps_pkgdb_get_virtualpkg(struct xbps_handle *xhp, const char *vpkg) { if (xbps_pkgdb_init(xhp) != 0) return NULL; return xbps_find_virtualpkg_in_dict(xhp, xhp->pkgdb, vpkg); }
xbps_dictionary_t xbps_repo_get_virtualpkg(struct xbps_repo *repo, const char *pkg) { xbps_dictionary_t pkgd; assert(repo); assert(pkg); if (repo->idx == NULL) return NULL; pkgd = xbps_find_virtualpkg_in_dict(repo->xhp, repo->idx, pkg); if (pkgd) { xbps_dictionary_set_cstring_nocopy(pkgd, "repository", repo->uri); return pkgd; } return NULL; }