From 5bbbb3c8fdf73f7c3577fc2d4c467fbb19173ef8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 29 Jan 2011 17:57:01 +0100 Subject: [PATCH] xbps_find_pkg_in_*: search for virtual pkg before the real one. --- lib/plist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plist.c b/lib/plist.c index fff44f2e..fec50466 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -266,19 +266,19 @@ find_pkg_in_array(prop_array_t array, const char *str, bool bypattern) while ((obj = prop_object_iterator_next(iter))) { if (bypattern) { + if (xbps_find_virtual_pkg_in_dict(obj, str, true)) + break; prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); if (xbps_pkgpattern_match(pkgver, __UNCONST(str))) break; - if (xbps_find_virtual_pkg_in_dict(obj, str, true)) - break; } else { + if (xbps_find_virtual_pkg_in_dict(obj, str, false)) + break; prop_dictionary_get_cstring_nocopy(obj, "pkgname", &dpkgn); if (strcmp(dpkgn, str) == 0) break; - if (xbps_find_virtual_pkg_in_dict(obj, str, false)) - break; } } prop_object_iterator_release(iter);