[pacman-dev] [PATCH v2 4/6] pacsearch: fixed regular expression for local searches
Pierre Neidhardt
ambrevar at gmail.com
Mon Feb 3 18:16:50 EST 2014
Signed-off-by: Pierre Neidhardt <ambrevar at gmail.com>
---
contrib/pacsearch.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/pacsearch.in b/contrib/pacsearch.in
index 66b1683..5656b07 100644
--- a/contrib/pacsearch.in
+++ b/contrib/pacsearch.in
@@ -134,8 +134,9 @@ if ($#querypkgs >= 0) {
}
foreach $_ (@querypkgs) {
- # we grab the following fields: repo, name, ver, group, installed, and desc
- my @pkgfields = /^(.*?)\/(.*?) (.*?) ?(\(.*?\))? ?(\[.*\])?\n(.*)$/s;
+ # We grab the same field as before, even the "installed" which is always
+ # empty for local searches. This allows us to reserve a cell in @pkgfields.
+ my @pkgfields = /^(.*?)\/(.*?) (.*?) ?(\(.*?\))?()?\n(.*)$/s;
# skip any non-matching line
next if not defined $pkgfields[1];
# check if the package was listed in the sync out
--
1.8.5.3
More information about the pacman-dev
mailing list