File 0006-dont-call-build-pool-inside-the-loop.patch of Package PackageKit.import5521

From 8d0be51e6a5380cbf1dc373eb7bd5d98db04e518 Mon Sep 17 00:00:00 2001
From: Duncan Mac-Vicar P <dmacvicar@suse.de>
Date: Tue, 26 Jul 2011 11:21:37 +0200
Subject: [PATCH 6/8] dont call build pool inside the loop

---
 backends/zypp/pk-backend-zypp.cpp |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 85b7cbb..e885cb0 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -185,13 +185,12 @@ backend_get_requires_thread (PkBackend *backend)
 	//pk_backend_set_percentage (backend, 0);
 
 	PoolStatusSaver saver;
+	ResPool pool = zypp_build_pool (backend, true);
 	for (uint i = 0; package_ids[i]; i++) {
 		sat::Solvable solvable = zypp_get_package_by_id (backend, package_ids[i]);
 		PoolItem package;
 
 		if (solvable.isSystem ()) {
-			ResPool pool = zypp_build_pool (backend, true);
-
 			gboolean found = FALSE;
 			gchar **id_parts = pk_package_id_split (package_ids[i]);
 
-- 
1.7.6.4