diff --git a/bin/xbps-repo/index.c b/bin/xbps-repo/index.c index 0379a7ad..f50eb203 100644 --- a/bin/xbps-repo/index.c +++ b/bin/xbps-repo/index.c @@ -203,6 +203,15 @@ add_binpkg_to_index(prop_dictionary_t idxdict, goto out; } } else if (curpkgd) { + /* + * Ignore packages providing virtual packages greater than or + * equal than current package. + */ + if (xbps_find_virtual_pkg_in_dict(curpkgd, pkgname, false)) { + prop_object_release(newpkgd); + rv = EEXIST; + goto out; + } prop_dictionary_get_cstring_nocopy(curpkgd, "version", ®ver); if (xbps_cmpver(version, regver) <= 0) { xbps_warn_printf("skipping %s. %s-%s already "