diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-10-24 12:24:05 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-10-24 12:24:05 -0400 |
commit | e2261d351c8f11a9cef4b47b6db9774761b4dd5b (patch) | |
tree | 1cdcc0e5f347cc9a70e6731df286ee159705c506 | |
parent | 19bbb248fe431de5707b969641c31b2e6c7c3d65 (diff) | |
download | bcfg2-e2261d351c8f11a9cef4b47b6db9774761b4dd5b.tar.gz bcfg2-e2261d351c8f11a9cef4b47b6db9774761b4dd5b.tar.bz2 bcfg2-e2261d351c8f11a9cef4b47b6db9774761b4dd5b.zip |
ensure that source cache files do not get cleared on server startup
-rw-r--r-- | src/lib/Server/Plugins/Packages/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Packages/__init__.py b/src/lib/Server/Plugins/Packages/__init__.py index c54f31019..757781baa 100644 --- a/src/lib/Server/Plugins/Packages/__init__.py +++ b/src/lib/Server/Plugins/Packages/__init__.py @@ -184,10 +184,10 @@ class Packages(Bcfg2.Server.Plugin.Plugin, def _load_sources(self, force_update): """ Load sources from the config """ self.sentinels = set() - cachefiles = [] + cachefiles = set() for collection in list(Collection.collections.values()): - cachefiles.extend(collection.cachefiles) + cachefiles.update(collection.cachefiles) if not self.disableMetaData: collection.setup_data(force_update) self.sentinels.update(collection.basegroups) @@ -195,6 +195,7 @@ class Packages(Bcfg2.Server.Plugin.Plugin, Collection.clear_cache() for source in self.sources: + cachefiles.add(source.cachefile) if not self.disableMetaData: source.setup_data(force_update) |