From: Michael Tremer Date: Tue, 13 Dec 2022 11:38:47 +0000 (+0000) Subject: pakfire: Fix searching for descriptions X-Git-Tag: 0.9.29~418 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70fa1e8af8e63efb1383d9069034cb50c9609fe5;p=pakfire.git pakfire: Fix searching for descriptions SEARCH_SUBSTRING and SEARCH_GLOB does not seem to work together. Therefore I am dropping SEARCH_GLOB because a substring search is the more intuitive one. Fixes: #12998 Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/pakfire.c b/src/libpakfire/pakfire.c index 7a86c7f2c..0f3755606 100644 --- a/src/libpakfire/pakfire.c +++ b/src/libpakfire/pakfire.c @@ -1440,7 +1440,6 @@ PAKFIRE_EXPORT int pakfire_search(struct pakfire* pakfire, const char* what, int struct pakfire_packagelist** list) { Queue matches; Dataiterator di; - int dflags = 0; int r; // Get the pool ready @@ -1449,13 +1448,8 @@ PAKFIRE_EXPORT int pakfire_search(struct pakfire* pakfire, const char* what, int // Initialize the result queue queue_init(&matches); - if (flags & PAKFIRE_SEARCH_NAME_ONLY) - dflags = SEARCH_STRING|SEARCH_GLOB; - else - dflags = SEARCH_SUBSTRING|SEARCH_NOCASE|SEARCH_GLOB; - // Setup the data interator - dataiterator_init(&di, pakfire->pool, 0, 0, 0, what, dflags); + dataiterator_init(&di, pakfire->pool, 0, 0, 0, what, SEARCH_SUBSTRING|SEARCH_NOCASE); const Id keys[] = { SOLVABLE_NAME,