mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
7af1f66441
commit
c7879e77a7
@ -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) {
|
if (regexec(®, alpm_pkg_get_name(pkg), 0, 0, 0) == 0) {
|
||||||
matched = alpm_pkg_get_name(pkg);
|
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 */
|
/* check desc */
|
||||||
else if (regexec(®, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) {
|
else if (regexec(®, alpm_pkg_get_desc(pkg), 0, 0, 0) == 0) {
|
||||||
matched = alpm_pkg_get_desc(pkg);
|
matched = alpm_pkg_get_desc(pkg);
|
||||||
|
Loading…
Reference in New Issue
Block a user