Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:62
PackageKit.openSUSE_12.1
0003-only-load-repositories-once.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-only-load-repositories-once.patch of Package PackageKit.openSUSE_12.1
From 9e52fd2b3cf62202f4afe3afe21a350cbdec1f15 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P <dmacvicar@suse.de> Date: Tue, 26 Jul 2011 11:20:51 +0200 Subject: [PATCH 3/5] only load repositories once --- backends/zypp/zypp-utils.cpp | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp index 8fc69bd..4b84300 100644 --- a/backends/zypp/zypp-utils.cpp +++ b/backends/zypp/zypp-utils.cpp @@ -192,8 +192,11 @@ zypp_is_valid_repo (PkBackend *backend, RepoInfo repo) ResPool zypp_build_pool (PkBackend *backend, gboolean include_local) { + static gboolean repos_loaded = FALSE; + ZYpp::Ptr zypp = get_zypp (backend); + // the target is loaded or unloaded on request if (include_local) { // FIXME have to wait for fix in zypp (repeated loading of target) if (sat::Pool::instance().reposFind( sat::Pool::systemRepoAlias() ).solvablesEmpty ()) @@ -211,6 +214,10 @@ zypp_build_pool (PkBackend *backend, gboolean include_local) } } + // we only load repositories once. + if (repos_loaded) + return zypp->pool(); + // Add resolvables from enabled repos RepoManager manager; list<RepoInfo> repos; @@ -230,7 +237,9 @@ zypp_build_pool (PkBackend *backend, gboolean include_local) //FIXME see above, skip already cached repos if (sat::Pool::instance().reposFind( repo.alias ()) == Repository::noRepository) manager.loadFromCache (repo); + } + repos_loaded = true; } catch (const repo::RepoNoAliasException &ex) { g_error ("Can't figure an alias to look in cache"); } catch (const repo::RepoNotCachedException &ex) { -- 1.7.6.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor