From e37a9efb7421f9e0898aa3cd62d4cd49a49a3e00 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 15 Oct 2011 20:01:55 +0200 Subject: [PATCH] libxbps: check in virtual pkgs when matching replaced pkgs. --- lib/package_replaces.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/package_replaces.c b/lib/package_replaces.c index c62ca406..18e60370 100644 --- a/lib/package_replaces.c +++ b/lib/package_replaces.c @@ -58,8 +58,15 @@ xbps_repository_pkg_replaces(prop_dictionary_t transd, * to be replaced. */ instd = xbps_find_pkg_dict_installed(pattern, true); - if (instd == NULL) - continue; + if (instd == NULL) { + /* + * No package installed has been matched, try looking + * for a virtual package. + */ + instd = xbps_find_virtualpkg_dict_installed(pattern, true); + if (instd == NULL) + continue; + } /* * Check that we are not replacing the same package, due * to virtual packages.