From f7918ec5aaa2fab12461ad556e7e57a2c15e63e1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 11 Jul 2011 10:12:42 +0200 Subject: [PATCH] xbps-repo: ignore pkgs providing virtualpkgs in genindex target. --- bin/xbps-repo/index.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 "