- added equo post install trigger

- solved contentDiff bad unicode strings issue


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1193 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2008-02-13 09:54:10 +00:00
parent 936441fc60
commit b7737c2d18
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -1490,6 +1490,7 @@ class etpDatabase:
def contentDiff(self, idpackage, content):
self.checkReadOnly()
self.connection.text_factory = lambda x: unicode(x, "raw_unicode_escape")
# create a random table and fill
randomtable = "cdiff"+str(entropyTools.getRandomNumber())
self.cursor.execute('DROP TABLE IF EXISTS '+randomtable)
+17
View File
@@ -4720,6 +4720,10 @@ class TriggerInterface:
if self.pkgdata['trigger']:
functions.add('call_ext_postinstall')
# equo purge cache
if self.pkgdata['category']+"/"+self.pkgdata['name'] == "app-admin/equo":
functions.add("purgecache")
# triggers that are not needed when gentoo-compat is enabled
if not etpConst['gentoo-compat']:
@@ -4966,6 +4970,19 @@ class TriggerInterface:
os.remove(triggerfile)
return my_ext_status
def trigger_purgecache(self):
self.Entropy.equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Purging Equo cache...")
self.Entropy.updateProgress(
brown(" Remember: It is always better to leave Equo updates isolated."),
importance = 0,
header = red(" ##")
)
self.Entropy.updateProgress(
brown(" Purging Equo cache..."),
importance = 0,
header = red(" ##")
)
self.Entropy.purge_cache(False)
def trigger_fontconfig(self):
fontdirs = set()