[entropy.client] remove repositories list cache validation code

Dead code, no longer needed.
This commit is contained in:
Fabio Erculiani
2013-12-12 18:14:43 +01:00
parent fdceeaffbd
commit 88ca752724
2 changed files with 0 additions and 23 deletions

View File

@@ -21,26 +21,9 @@ from entropy.exceptions import RepositoryError
from entropy.cache import EntropyCacher
from entropy.db.exceptions import OperationalError, DatabaseError
REPO_LIST_CACHE_ID = 'repos/repolist'
class CacheMixin:
def _validate_repositories_cache(self):
# is the list of repos changed?
cached = self._cacher.pop(REPO_LIST_CACHE_ID)
if cached != self._settings['repositories']['order']:
# invalidate matching cache
try:
self._settings._clear_repository_cache(repoid = None)
except IOError:
pass
self._store_repository_list_cache()
def _store_repository_list_cache(self):
self._cacher.push(REPO_LIST_CACHE_ID,
self._settings['repositories']['order'],
async = False)
def clear_cache(self):
"""
Clear all the Entropy default cache directory. This function is

View File

@@ -796,18 +796,12 @@ class Client(Singleton, TextInterface, LoadersMixin, CacheMixin,
if shell_xcache:
self.xcache = False
do_validate_repo_cache = False
# now if we are on live, we should disable it
# are we running on a livecd? (/proc/cmdline has "cdroot")
if entropy.tools.islive():
self.xcache = False
elif (not entropy.tools.is_user_in_entropy_group()) and not user_xcache:
self.xcache = False
elif not user_xcache:
do_validate_repo_cache = True
if do_validate_repo_cache:
self._validate_repositories_cache()
if self._repo_validation:
self._validate_repositories()