diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-11-15 00:07:31 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-25 14:02:25 -0600 |
commit | c7879e77a716edc725858e316ea9d2fa00056d4d (patch) | |
tree | a2a378f2bd0079e4bbf9b2b2b6850dc1041e9930 /lib | |
parent | 7af1f664411d337d865b2b3bd876163f2b0fbac4 (diff) |
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/db.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |