- create content index only on non-repo databases

- check if /var/db/pkg exists

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1429 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2008-03-08 17:06:24 +00:00
parent ff318f3037
commit 6bbb604854
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -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()
+3 -2
View File
@@ -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()