From b968a365cbed4eb1ec074ffe3e9c76007df598d0 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 23 Dec 2009 19:37:23 +0100 Subject: [PATCH] [entropy.client] open_client_repository: always add EntropyRepository plugin, even if in safe mode. And drop changelog data from db. --- libraries/entropy/client/interfaces/methods.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/entropy/client/interfaces/methods.py b/libraries/entropy/client/interfaces/methods.py index 12bc5c9c7..567b8ccca 100644 --- a/libraries/entropy/client/interfaces/methods.py +++ b/libraries/entropy/client/interfaces/methods.py @@ -458,7 +458,9 @@ class RepositoryMixin: type = "warning", header = bold("!!!"), ) - return self.open_memory_database(dbname = etpConst['clientdbid']) + m_conn = self.open_memory_database(dbname = etpConst['clientdbid']) + self._add_plugin_to_client_repository(m_conn) + return m_conn # if we are in unit testing mode (triggered by unit testing # code), always use db from ram @@ -481,6 +483,8 @@ class RepositoryMixin: xcache = self.xcache, indexing = self.indexing ) self._add_plugin_to_client_repository(conn) + # TODO: remove this in future, drop useless data from clientdb + conn.dropChangelog() except (self.dbapi2.DatabaseError,): self.entropyTools.print_traceback(f = self.clientLog) conn = load_db_from_ram() @@ -498,7 +502,7 @@ class RepositoryMixin: conn = load_db_from_ram() self.clientDbconn = conn - return self.clientDbconn + return conn def client_repository_sanity_check(self): self.updateProgress(