diff --git a/client/triggerTools.py b/client/triggerTools.py index a161df047..83ac8fc42 100644 --- a/client/triggerTools.py +++ b/client/triggerTools.py @@ -90,6 +90,19 @@ def postinstall(pkgdata): if pkgdata['name'] == "pygobject": functions.add('pygtksetup') + # load linker paths + ldpaths = set() + try: + f = open("/etc/ld.so.conf","r") + paths = f.readlines() + for path in paths: + if path.strip(): + if path[0] == "/": + ldpaths.add(os.path.normpath(path.strip())) + f.close() + except: + pass + # prepare content for x in pkgdata['content']: if x.startswith("/usr/share/icons") and x.endswith("index.theme"): @@ -108,6 +121,11 @@ def postinstall(pkgdata): functions.add('addbootablekernel') if x.startswith('/usr/src/'): functions.add('createkernelsym') + if x.endswith('/usr/lib'): + functions.add('createkernelsym') + for path in ldpaths: + if x.startswith(path) and (x.find(".so") != -1): + functions.add('ldconfig') #if x.startswith("/etc/init.d/"): do it externally # functions.add('initadd') @@ -163,6 +181,19 @@ def postremove(pkgdata): if pkgdata['category'] == "media-fonts": functions.add("fontconfig") + # load linker paths + ldpaths = set() + try: + f = open("/etc/ld.so.conf","r") + paths = f.readlines() + for path in paths: + if path.strip(): + if path[0] == "/": + ldpaths.add(os.path.normpath(path.strip())) + f.close() + except: + pass + for x in pkgdata['removecontent']: if x.startswith("/usr/share/icons") and x.endswith("index.theme"): functions.add('iconscache') @@ -180,6 +211,9 @@ def postremove(pkgdata): functions.add('removeinit') if x.endswith('.py'): functions.add('cleanpy') + for path in ldpaths: + if x.startswith(path) and (x.find(".so") != -1): + functions.add('ldconfig') return functions @@ -492,6 +526,11 @@ def createkernelsym(pkgdata): os.symlink(todir,"/usr/src/linux") break +def ldconfig(pkgdata): + equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"[POST] Running ldconfig") + print_info(red(" ##")+brown(" Regenerating /etc/ld.so.cache")) + os.system("ldconfig &> /dev/null") + ######################################################## #### ## Internal functions diff --git a/client/uiTools.py b/client/uiTools.py index 01b69142d..4b33a47ce 100644 --- a/client/uiTools.py +++ b/client/uiTools.py @@ -965,7 +965,7 @@ def dependenciesTest(quiet = False, ask = False, pretend = False, clientDbconn = # organize packages = set([x[0] for x in packagesNeeded]) - applicationLockCheck("install") + entropyTools.applicationLockCheck("install") installPackages(packages, deps = False, ask = ask) print_info(red(" @@ ")+blue("All done."))