* update environment iff we got a shared object or something under /etc/env.d

This commit is contained in:
Eray Özkural
2005-10-24 21:21:44 +00:00
parent 583c118dc2
commit baa0f32a3e
+13 -2
View File
@@ -86,8 +86,7 @@ class Install(AtomicOperation):
import pisi.comariface as comariface
comariface.run_postinstall(self.pkginfo.name)
self.update_databases()
ctx.ui.info("Regenerating /etc/ld.so.cache...")
util.env_update()
self.update_environment()
def check_requirements(self):
"""check system requirements"""
@@ -231,6 +230,18 @@ class Install(AtomicOperation):
# installed packages
packagedb.inst_packagedb.add_package(self.pkginfo)
def update_environment(self):
# check if we have any shared objects or anything under
# /etc/env.d
shared = False
for x in self.files.list:
if x.path.endswith('.so') or x.path.startswith('/etc/env.d'):
shared = True
break
if shared:
ctx.ui.info("Regenerating /etc/ld.so.cache...")
util.env_update()
def install_single(pkg, upgrade = False):
"""install a single package from URI or ID"""