From 88ca752724253c52a79b9a3bc1f28ec1ea05f175 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 12 Dec 2013 18:14:43 +0100 Subject: [PATCH] [entropy.client] remove repositories list cache validation code Dead code, no longer needed. --- lib/entropy/client/interfaces/cache.py | 17 ----------------- lib/entropy/client/interfaces/client.py | 6 ------ 2 files changed, 23 deletions(-) diff --git a/lib/entropy/client/interfaces/cache.py b/lib/entropy/client/interfaces/cache.py index fa916a94e..e73b5a711 100644 --- a/lib/entropy/client/interfaces/cache.py +++ b/lib/entropy/client/interfaces/cache.py @@ -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 diff --git a/lib/entropy/client/interfaces/client.py b/lib/entropy/client/interfaces/client.py index 2ae66c651..f0494cd89 100644 --- a/lib/entropy/client/interfaces/client.py +++ b/lib/entropy/client/interfaces/client.py @@ -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()