From 7f1563b9c61a6f219e86e957b4363eeb1812b4ad Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 23 Jun 2014 16:08:04 +0100
Subject: [PATCH 11/13] [rpm] reduce number of calls to rpm

Fixes #300.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>

Conflicts:

	sos/plugins/rpm.py
---
 sos/plugins/rpm.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
index d4c80b7..1ff6d25 100644
--- a/sos/plugins/rpm.py
+++ b/sos/plugins/rpm.py
@@ -39,10 +39,12 @@ class rpm(sos.plugintools.PluginBase):
         else:
             pkgs_by_regex = self.policy().allPkgsByNameRegex
             verify_list = map(pkgs_by_regex, self.verify_list)
+            verify_pkgs = ""
             for pkg_list in verify_list:
                 for pkg in pkg_list:
                     if 'debuginfo' in pkg['name'] or 'devel' in pkg['name']:
                         continue
-                    self.collectExtOutput("rpm -V %s" % pkg['name'])
+                    verify_pkgs = "%s %s" % (verify_pkgs, pkg['name'])
+            self.collectExtOutput("rpm -V %s" % verify_pkgs)
         return
 
-- 
1.9.3

