critical fixes to installFile()

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@442 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2007-08-12 06:25:25 +00:00
parent bf6b205ab4
commit 979ed246d4
2 changed files with 13 additions and 6 deletions

View File

@@ -2083,10 +2083,13 @@ class etpDatabase:
dbLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"areCompileFlagsAvailable: flags tuple "+chost+"|"+cflags+"|"+cxxflags+" available.")
return result
def searchBelongs(self, file):
def searchBelongs(self, file, like = False):
dbLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"searchBelongs: called for "+file)
result = []
self.cursor.execute('SELECT idpackage FROM content WHERE file = "'+file+'"')
if (like):
self.cursor.execute('SELECT idpackage FROM content WHERE file LIKE "'+file+'"')
else:
self.cursor.execute('SELECT idpackage FROM content WHERE file = "'+file+'"')
for row in self.cursor:
result.append(row[0])
return result