From c7879e77a716edc725858e316ea9d2fa00056d4d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 15 Nov 2007 00:07:31 -0600 Subject: Additionally search for non-regex strings on a db search operation This closes out FS#6500 and covers cases where the package names contain regex characters (i.e. the case of dvd+rw-tools) Signed-off-by: Aaron Griffin --- lib/libalpm/db.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index f511c714..b772adde 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -507,6 +507,10 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles) if (regexec(®, alpm_pkg_get_name(pkg), 0, 0, 0) == 0) { matched = alpm_pkg_get_name(pkg); } + /* check plain text name */ + else if (strstr(alpm_pkg_get_name(pkg), targ)) { + matched = alpm_pkg_get_name(pkg); + } /* check desc */ else if (regexec(®, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) { matched = alpm_pkg_get_desc(pkg); -- cgit v1.2.3-70-g09d2