diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 44d09fc48..e6fc3eb69 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -3473,7 +3473,8 @@ class etpDatabase: self.cursor.execute('CREATE TABLE packed_data ( idpack INTEGER PRIMARY KEY, data BLOB );') def createAllIndexes(self): - self.createContentIndex() + if not self.dbname.startswith(etpConst['dbnamerepoprefix']): + self.createContentIndex() self.createBaseinfoIndex() self.createKeywordsIndex() self.createDependenciesIndex() diff --git a/libraries/entropy.py b/libraries/entropy.py index 8fb92bef1..8be1a8225 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -2698,13 +2698,14 @@ class PackageInterface: # handle gentoo-compat _portage_avail = False + portDbDir = '' try: import portageTools + portDbDir = portageTools.getPortageAppDbPath() _portage_avail = True except: return -1 # no Portage support - if (_portage_avail): - portDbDir = portageTools.getPortageAppDbPath() + if _portage_avail and os.path.isdir(portDbDir): # extract xpak from unpackDir+etpConst['packagecontentdir']+"/"+package key = self.infoDict['category']+"/"+self.infoDict['name'] atomsfound = set()