From 242729a2cf11a749b416e4a4d2dc78ffeb87e2d9 Mon Sep 17 00:00:00 2001 From: Michael E Brown Date: Thu, 29 Nov 2007 17:38:02 -0600 Subject: use log.info() to tell about enabled caches rather than misusing state(). the state() method should be used to say what is happening. --- src/py-libs/plugins/root_cache.py | 2 +- src/py-libs/plugins/yum_cache.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/py-libs/plugins') diff --git a/src/py-libs/plugins/root_cache.py b/src/py-libs/plugins/root_cache.py index 42061f4..8ed2492 100644 --- a/src/py-libs/plugins/root_cache.py +++ b/src/py-libs/plugins/root_cache.py @@ -58,13 +58,13 @@ class RootCache(object): @traceLog(moduleLog) def _rootCachePreInitHook(self): + moduleLog.info("enabled root cache") mock.util.mkdirIfAbsent(self.rootSharedCachePath) # lock so others dont accidentally use root cache while we operate on it. if self.rootCacheLock is None: self.rootCacheLock = open(os.path.join(self.rootSharedCachePath, "rootcache.lock"), "a+") # check cache age: - self.state("enabled root cache") try: statinfo = os.stat(self.rootCacheFile) file_age_days = (time.time() - statinfo.st_ctime) / (60 * 60 * 24) diff --git a/src/py-libs/plugins/yum_cache.py b/src/py-libs/plugins/yum_cache.py index 72497ff..5a4abc3 100644 --- a/src/py-libs/plugins/yum_cache.py +++ b/src/py-libs/plugins/yum_cache.py @@ -62,6 +62,7 @@ class YumCache(object): @traceLog(moduleLog) def _yumCachePreInitHook(self): + moduleLog.info("enabled yum cache") mock.util.mkdirIfAbsent(os.path.join(self.rootdir, 'var/cache/yum')) mock.util.mkdirIfAbsent(self.yumSharedCachePath) @@ -70,7 +71,7 @@ class YumCache(object): self._yumCachePreYumHook() if self.online: - self.state("enabled yum cache, cleaning yum metadata") + self.state("cleaning yum metadata") for (dirpath, dirnames, filenames) in os.walk(self.yumSharedCachePath): for filename in filenames: fullPath = os.path.join(dirpath, filename) -- cgit