libxbps: add xbps_find_virtualpkg_in_array_by_{name,pattern} and use it.
This commit is contained in:
@@ -168,7 +168,7 @@ xbps_requiredby_pkg_add(prop_array_t pkgs_array, prop_dictionary_t pkgd)
|
||||
break;
|
||||
}
|
||||
pkgd_regpkgdb =
|
||||
xbps_find_pkg_in_array_by_pattern(pkgs_array, str);
|
||||
xbps_find_virtualpkg_in_array_by_pattern(pkgs_array, str);
|
||||
if (pkgd_regpkgdb == NULL)
|
||||
return EINVAL;
|
||||
|
||||
|
||||
@@ -121,6 +121,18 @@ xbps_find_pkg_in_array_by_pattern(prop_array_t array, const char *pattern)
|
||||
return find_pkg_in_array(array, pattern, true, false);
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_virtualpkg_in_array_by_name(prop_array_t array, const char *name)
|
||||
{
|
||||
return find_pkg_in_array(array, name, false, true);
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_virtualpkg_in_array_by_pattern(prop_array_t array, const char *pattern)
|
||||
{
|
||||
return find_pkg_in_array(array, pattern, true, true);
|
||||
}
|
||||
|
||||
static const char *
|
||||
find_virtualpkg_user_in_conf(const char *vpkg, bool bypattern)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user