summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-07-15 15:32:21 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-07-15 15:43:07 -0400
commit2217fa6295070f137988006c4bb00d25dfc0cb5e (patch)
treefa79bcf1be203d5719871c3ea9d01b42c5c689b2 /src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
parent156212c6fc294382198840e143f0867e0536601e (diff)
downloadbcfg2-2217fa6295070f137988006c4bb00d25dfc0cb5e.tar.gz
bcfg2-2217fa6295070f137988006c4bb00d25dfc0cb5e.tar.bz2
bcfg2-2217fa6295070f137988006c4bb00d25dfc0cb5e.zip
Read-only yum cache
This makes the yum cache read-only so that bcfg2-yum-helper cannot update the cache on the fly, which should help avoid locking issues with the yum caches that can cause client runs to fail. It also makes the Packages plugin behave more consistently, since use of yum libraries won't cause the cache to be refreshed at random times on the fly, but rather more predictably as with the Apt cache or the yum cache without using yum libraries. Unlike those two cases, though, the caches will not all be downloaded initially, but rather opportunistically as needed. In order for this to work, the Bcfg2 server must not run as root. Root ignores the 'w' permissions bit, so the cache cannot be made read-only.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Collection.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Collection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
index b25cb0fc4..39c51f351 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Collection.py
@@ -614,6 +614,10 @@ class Collection(list, Bcfg2.Server.Plugin.Debuggable):
self.filter_unknown(unknown)
return packages, unknown
+ def __repr__(self):
+ return "%s(%s)" % (self.__class__.__name__,
+ list.__repr__(self))
+
def get_collection_class(source_type):
""" Given a source type, determine the class of Collection object