From b7737c2d189e52df8d90f0eaee6421c436aacd89 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Wed, 13 Feb 2008 09:54:10 +0000 Subject: [PATCH] - 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 --- libraries/databaseTools.py | 1 + libraries/entropy.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 1edde9713..d09cf25b7 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -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) diff --git a/libraries/entropy.py b/libraries/entropy.py index 1f89e6706..c5621f9cd 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -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()