From 693f0b31d56a75d2b79024fcbc972ca43b4f2adf Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 10 Dec 2009 01:23:42 +0100 Subject: [PATCH] [entropy.client.interfaces.package] when loading entropy binpkg db, do it quickly --- libraries/entropy/client/interfaces/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libraries/entropy/client/interfaces/package.py b/libraries/entropy/client/interfaces/package.py index 1ede988ea..11be7b836 100644 --- a/libraries/entropy/client/interfaces/package.py +++ b/libraries/entropy/client/interfaces/package.py @@ -904,8 +904,17 @@ class Package: # normal repositories data = dbconn.getPackageData(self.pkgmeta['idpackage'], get_content = False) + + # indexing_override = False : no need to index tables + # xcache = False : no need to use on-disk cache + # skipChecks = False : creating missing tables is unwanted, + # and also no foreign keys update + # readOnly = True: no need to open in write mode pkg_dbconn = self.Entropy.open_generic_database( - self.pkgmeta['pkgdbpath']) + self.pkgmeta['pkgdbpath'], skipChecks = True, + indexing_override = False, readOnly = True, + xcache = False) + # it is safe to consider that package dbs coming from repos # contain only one entry pkg_idpackage = sorted(pkg_dbconn.listAllIdpackages())[0]