xbps_find_pkg_in_*: search for virtual pkg before the real one.
This commit is contained in:
parent
7c8a89c968
commit
5bbbb3c8fd
@ -266,19 +266,19 @@ find_pkg_in_array(prop_array_t array, const char *str, bool bypattern)
|
|||||||
|
|
||||||
while ((obj = prop_object_iterator_next(iter))) {
|
while ((obj = prop_object_iterator_next(iter))) {
|
||||||
if (bypattern) {
|
if (bypattern) {
|
||||||
|
if (xbps_find_virtual_pkg_in_dict(obj, str, true))
|
||||||
|
break;
|
||||||
prop_dictionary_get_cstring_nocopy(obj,
|
prop_dictionary_get_cstring_nocopy(obj,
|
||||||
"pkgver", &pkgver);
|
"pkgver", &pkgver);
|
||||||
if (xbps_pkgpattern_match(pkgver, __UNCONST(str)))
|
if (xbps_pkgpattern_match(pkgver, __UNCONST(str)))
|
||||||
break;
|
break;
|
||||||
if (xbps_find_virtual_pkg_in_dict(obj, str, true))
|
|
||||||
break;
|
|
||||||
} else {
|
} else {
|
||||||
|
if (xbps_find_virtual_pkg_in_dict(obj, str, false))
|
||||||
|
break;
|
||||||
prop_dictionary_get_cstring_nocopy(obj,
|
prop_dictionary_get_cstring_nocopy(obj,
|
||||||
"pkgname", &dpkgn);
|
"pkgname", &dpkgn);
|
||||||
if (strcmp(dpkgn, str) == 0)
|
if (strcmp(dpkgn, str) == 0)
|
||||||
break;
|
break;
|
||||||
if (xbps_find_virtual_pkg_in_dict(obj, str, false))
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prop_object_iterator_release(iter);
|
prop_object_iterator_release(iter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user