xbps-repo: faster 'genindex' target implementation for index-files.plist.
This commit is contained in:
@@ -82,6 +82,14 @@ remove_string_from_array(prop_array_t array, const char *str, int mode)
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
} else if (mode == 3) {
|
||||
/* match by pkgver, obj is a dictionary */
|
||||
prop_dictionary_get_cstring_nocopy(obj,
|
||||
"pkgver", &curname);
|
||||
if (strcmp(curname, str) == 0) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
@@ -114,6 +122,12 @@ xbps_remove_pkg_from_array_by_name(prop_array_t array, const char *name)
|
||||
return remove_string_from_array(array, name, 2);
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_remove_pkg_from_array_by_pkgver(prop_array_t array, const char *pkgver)
|
||||
{
|
||||
return remove_string_from_array(array, pkgver, 3);
|
||||
}
|
||||
|
||||
bool
|
||||
xbps_remove_pkg_from_dict_by_name(prop_dictionary_t dict,
|
||||
const char *key,
|
||||
|
||||
Reference in New Issue
Block a user