summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Packages/PackagesConfig.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-10-19 10:14:43 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-10-19 10:14:43 -0400
commitc4154ca4d2b7b2a7bcc266d3f473ff1d247cac9f (patch)
tree6138db8063f0292037426e978311940a3d83b677 /src/lib/Server/Plugins/Packages/PackagesConfig.py
parent826f385767ccf9f608fcfbe35e381a9dbc59db4b (diff)
downloadbcfg2-c4154ca4d2b7b2a7bcc266d3f473ff1d247cac9f.tar.gz
bcfg2-c4154ca4d2b7b2a7bcc266d3f473ff1d247cac9f.tar.bz2
bcfg2-c4154ca4d2b7b2a7bcc266d3f473ff1d247cac9f.zip
Various Packages plugin fixes:
* Added bcfg2-yum-helper to offload Yum API calls to a short-lived process. As absurd as this is, it appears to be the standard way to get around Yum's atrocious memory handling (cf. yum-updatesd). * Added SourceInitError for non-fatal errors instantiating new sources. * Fixed bug that caused all cached data to be removed on server startup (reported by mikemccllstr on IRC). * Fixed a number of overly aggressive caching issues. * Fixed the way sources are loaded at server startup. * Fixed handling of Yum package groups.
Diffstat (limited to 'src/lib/Server/Plugins/Packages/PackagesConfig.py')
-rw-r--r--src/lib/Server/Plugins/Packages/PackagesConfig.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Packages/PackagesConfig.py b/src/lib/Server/Plugins/Packages/PackagesConfig.py
index 1bb250007..d3732bf96 100644
--- a/src/lib/Server/Plugins/Packages/PackagesConfig.py
+++ b/src/lib/Server/Plugins/Packages/PackagesConfig.py
@@ -25,4 +25,9 @@ class PackagesConfig(Bcfg2.Server.Plugin.FileBacked,
for section in self.sections():
self.remove_section(section)
self.read(self.name)
- self.pkg_obj.Reload()
+ if self.pkg_obj.sources.loaded:
+ # only reload Packages plugin if sources have been loaded.
+ # otherwise, this is getting called on server startup, and
+ # we have to wait until all sources have been indexed
+ # before we can call Packages.Reload()
+ self.pkg_obj.Reload()