handle new content structure
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@670 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+8
-23
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user