diff --git a/client/triggerTools.py b/client/triggerTools.py index f34a611c8..8febe7c8a 100644 --- a/client/triggerTools.py +++ b/client/triggerTools.py @@ -91,9 +91,7 @@ def postinstall(pkgdata): functions.add('pygtksetup') # prepare content - mycnt = set(pkgdata['content']) - - for x in mycnt: + for x in pkgdata['content']: if x.startswith("/usr/share/icons") and x.endswith("index.theme"): functions.add('iconscache') if x.startswith("/usr/share/mime"): @@ -123,10 +121,7 @@ def preinstall(pkgdata): if pkgdata['trigger']: functions.add('call_ext_preinstall') - # prepare content - mycnt = set(pkgdata['content']) - - for x in mycnt: + for x in pkgdata['content']: if x.startswith("/etc/init.d/"): functions.add('initinform') if x.startswith("/boot"): @@ -166,10 +161,7 @@ def postremove(pkgdata): if pkgdata['category'] == "media-fonts": functions.add("fontconfig") - # prepare content - mycnt = set(pkgdata['removecontent']) - - for x in mycnt: + for x in pkgdata['removecontent']: if x.startswith("/usr/share/icons") and x.endswith("index.theme"): functions.add('iconscache') if x.startswith("/usr/share/mime"): @@ -199,10 +191,7 @@ def preremove(pkgdata): if pkgdata['trigger']: functions.add('call_ext_preremove') - # prepare content - mycnt = set(pkgdata['removecontent']) - - for x in mycnt: + for x in pkgdata['removecontent']: if x.startswith("/etc/init.d/"): functions.add('initdisable') if x.startswith("/boot"): @@ -279,8 +268,7 @@ def gccswitch(pkgdata): def iconscache(pkgdata): equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Updating icons cache...") print_info(red(" ##")+brown(" Updating icons cache...")) - mycnt = set(pkgdata['content']) - for file in mycnt: + for file in pkgdata['content']: if file.startswith("/usr/share/icons") and file.endswith("index.theme"): cachedir = os.path.dirname(file) generate_icons_cache(cachedir) @@ -333,8 +321,7 @@ def sqliteinst(pkgdata): sqlite_update_symlink() def initdisable(pkgdata): - mycnt = set(pkgdata['removecontent']) - for file in mycnt: + for file in pkgdata['removecontent']: if file.startswith("/etc/init.d/") and os.path.isfile(file): # running? running = os.path.isfile(INITSERVICES_DIR+'/started/'+os.path.basename(file)) @@ -342,15 +329,13 @@ def initdisable(pkgdata): initdeactivate(file, running, scheduled) def initinform(pkgdata): - mycnt = set(pkgdata['content']) - for file in mycnt: + for file in pkgdata['content']: if file.startswith("/etc/init.d/") and not os.path.isfile(file): equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[PRE] A new service will be installed: "+file) print_info(red(" ##")+brown(" A new service will be installed: ")+file) def removeinit(pkgdata): - mycnt = set(pkgdata['removecontent']) - for file in mycnt: + for file in pkgdata['removecontent']: if file.startswith("/etc/init.d/") and os.path.isfile(file): equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Removing boot service: "+os.path.basename(file)) print_info(red(" ##")+brown(" Removing boot service: ")+os.path.basename(file))