summaryrefslogtreecommitdiffstats
path: root/contrib/pacsearch.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-27 19:44:17 +0200
committerDan McGee <dan@archlinux.org>2011-07-27 19:44:17 +0200
commit06974ebf2f6674baf01da79be9658277cbf2650e (patch)
tree91e3be931c90ca1cc772a928a3e5bcf70a7f5a3d /contrib/pacsearch.in
parent98073afe5527aa8a08c7119b61d0251250168e82 (diff)
downloadpacman-06974ebf2f6674baf01da79be9658277cbf2650e.tar.gz
pacman-06974ebf2f6674baf01da79be9658277cbf2650e.tar.xz
contrib/pacsearch: skip non-matching lines
This prevents some perl errors from popping up when pacman prints error or warning messages. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib/pacsearch.in')
-rwxr-xr-xcontrib/pacsearch.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/pacsearch.in b/contrib/pacsearch.in
index dd848a73..db9d6ad1 100755
--- a/contrib/pacsearch.in
+++ b/contrib/pacsearch.in
@@ -111,6 +111,8 @@ if ($#querypkgs >= 0) {
foreach $_ (@querypkgs) {
# we grab 4 fields here: repo, name/ver, installed, and desc
my @pkgfields = /^(.*?)\/(.*?) ?(\[.*\])?\n(.*)$/s;
+ # skip any non-matching line
+ next if not defined $pkgfields[1];
# since installed is optional, we should fill it in if necessary
$pkgfields[2] = "" if not defined $pkgfields[2];
# check if the package was listed in the sync out