summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-11-15 07:07:31 +0100
committerDan McGee <dan@archlinux.org>2007-11-25 21:02:25 +0100
commitc7879e77a716edc725858e316ea9d2fa00056d4d (patch)
treea2a378f2bd0079e4bbf9b2b2b6850dc1041e9930 /lib/libalpm
parent7af1f664411d337d865b2b3bd876163f2b0fbac4 (diff)
downloadpacman-c7879e77a716edc725858e316ea9d2fa00056d4d.tar.gz
pacman-c7879e77a716edc725858e316ea9d2fa00056d4d.tar.xz
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/libalpm')
-rw-r--r--lib/libalpm/db.c4
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(&reg, 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(&reg, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) {
matched = alpm_pkg_get_desc(pkg);