Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-27 12:44:17 -0500
committerDan McGee <dan@archlinux.org>2011-07-27 12:44:17 -0500
commit06974ebf2f6674baf01da79be9658277cbf2650e (patch)
tree91e3be931c90ca1cc772a928a3e5bcf70a7f5a3d
parent98073afe5527aa8a08c7119b61d0251250168e82 (diff)
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>
-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