From c2e774d4d177ba088db599be01b1d74b1646c55c Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Mon, 10 Sep 2018 11:49:54 +0200 Subject: [PATCH] With the new code SEARCH_COMPLETE_FILELIST is the default. We may add a SEARCH_FILTERED_FILELIST flag in the future if there is a use case. --- TODO_1.0 | 1 + src/dataiterator.h | 2 +- src/pool.c | 2 +- src/selection.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO_1.0 b/TODO_1.0 index 13000fcb..8a7bed24 100644 --- a/TODO_1.0 +++ b/TODO_1.0 @@ -26,3 +26,4 @@ IDEAS: +drop SEARCH_FILES and add SEARCH_BASENAME instead? diff --git a/src/dataiterator.h b/src/dataiterator.h index 3133686b..9c1d94a6 100644 --- a/src/dataiterator.h +++ b/src/dataiterator.h @@ -52,7 +52,7 @@ typedef struct _KeyValue { #define SEARCH_SUB (1<<9) #define SEARCH_ARRAYSENTINEL (1<<10) #define SEARCH_DISABLED_REPOS (1<<11) -#define SEARCH_COMPLETE_FILELIST (1<<12) +#define SEARCH_COMPLETE_FILELIST (1<<12) /* ignored, this is the default */ /* stringification flags */ #define SEARCH_SKIP_KIND (1<<16) diff --git a/src/pool.c b/src/pool.c index 60cc0f49..3ff5bd20 100644 --- a/src/pool.c +++ b/src/pool.c @@ -927,7 +927,7 @@ pool_addstdproviders(Pool *pool, Id d) return 1; } queue_init_buffer(&q, qbuf, sizeof(qbuf)/sizeof(*qbuf)); - dataiterator_init(&di, pool, 0, 0, SOLVABLE_FILELIST, str, SEARCH_STRING|SEARCH_FILES|SEARCH_COMPLETE_FILELIST); + dataiterator_init(&di, pool, 0, 0, SOLVABLE_FILELIST, str, SEARCH_STRING|SEARCH_FILES); for (; dataiterator_step(&di); dataiterator_skip_solvable(&di)) { Solvable *s = pool->solvables + di.solvid; diff --git a/src/selection.c b/src/selection.c index d44c4829..f0422d4f 100644 --- a/src/selection.c +++ b/src/selection.c @@ -940,7 +940,7 @@ selection_filelist(Pool *pool, Queue *selection, const char *name, int flags) if ((flags & SELECTION_NOCASE) != 0) type |= SEARCH_NOCASE; queue_init(&q); - dataiterator_init(&di, pool, flags & SELECTION_INSTALLED_ONLY ? pool->installed : 0, 0, SOLVABLE_FILELIST, name, type|SEARCH_FILES|SEARCH_COMPLETE_FILELIST); + dataiterator_init(&di, pool, flags & SELECTION_INSTALLED_ONLY ? pool->installed : 0, 0, SOLVABLE_FILELIST, name, type|SEARCH_FILES); while (dataiterator_step(&di)) { Solvable *s = pool->solvables + di.solvid; -- 2.47.2