summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2014-02-13 20:49:19 -0500
committerJason Woodward2014-02-13 20:49:19 -0500
commitd912cbd8d56f845219aca1e556d586c8adf4ee97 (patch)
tree7aed0e56ea2181654a86434fe4d290e1d00e97f9
parentc7f5df076dfe1c8de32abe517f7aca25f1ccdad4 (diff)
downloadslapt-get-d912cbd8d56f845219aca1e556d586c8adf4ee97.tar.gz
tweak search to return exact name matches in case of regex characters
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 84f5451..5683fa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
+0.10.2q Feb 13, 2014
+ * tweak search to return exact name matches in case of regex characters
+
0.10.2p Apr 29, 2013
* Add newline to the end of filelist output
* do not require root privs for filelist option (thanks David Unric)
diff --git a/src/package.c b/src/package.c
index f4c83fd..9524cb0 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1318,6 +1318,10 @@ slapt_pkg_list_t *slapt_search_pkg_list(slapt_pkg_list_t *list,
return matches;
for (i = 0; i < list->pkg_count; i++ ) {
+ if (strcmp(list->pkgs[i]->name, pattern) == 0) {
+ slapt_add_pkg_to_pkg_list(matches,list->pkgs[i]);
+ continue;
+ }
slapt_execute_regex(search_regex,list->pkgs[i]->name);
name_r = search_regex->reg_return;