From 061b02bebc5cd0bfeae1750f387daf572ca3880f Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 11 Dec 2013 07:43:50 +0100 Subject: [PATCH] [entropy.db.sqlite] move indexing setup back to object constructor This has nothing to do with schema update --- lib/entropy/db/sqlite.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/entropy/db/sqlite.py b/lib/entropy/db/sqlite.py index 607e0310a..c9cd88ec4 100644 --- a/lib/entropy/db/sqlite.py +++ b/lib/entropy/db/sqlite.py @@ -222,6 +222,15 @@ class EntropySQLiteRepository(EntropySQLRepository): self._schema_update_run = False self._schema_update_lock = threading.Lock() + if not self._skip_checks: + + if not entropy.tools.is_user_in_entropy_group(): + # forcing since we won't have write access to db + self._indexing = False + # live systems don't like wasting RAM + if entropy.tools.islive() and not etpConst['systemroot']: + self._indexing = False + self._maybeDatabaseSchemaUpdates() def lock_path(self): @@ -250,13 +259,6 @@ class EntropySQLiteRepository(EntropySQLRepository): update = False if not self._skip_checks: - if not entropy.tools.is_user_in_entropy_group(): - # forcing since we won't have write access to db - self._indexing = False - # live systems don't like wasting RAM - if entropy.tools.islive() and not etpConst['systemroot']: - self._indexing = False - def _is_avail(): if self._is_memory(): return True