[entropy.db.sqlite] move indexing setup back to object constructor

This has nothing to do with schema update
This commit is contained in:
Fabio Erculiani
2013-12-11 07:43:50 +01:00
parent 023dc52368
commit 061b02bebc
+9 -7
View File
@@ -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