* update environment iff we got a shared object or something under /etc/env.d
This commit is contained in:
@@ -86,8 +86,7 @@ class Install(AtomicOperation):
|
|||||||
import pisi.comariface as comariface
|
import pisi.comariface as comariface
|
||||||
comariface.run_postinstall(self.pkginfo.name)
|
comariface.run_postinstall(self.pkginfo.name)
|
||||||
self.update_databases()
|
self.update_databases()
|
||||||
ctx.ui.info("Regenerating /etc/ld.so.cache...")
|
self.update_environment()
|
||||||
util.env_update()
|
|
||||||
|
|
||||||
def check_requirements(self):
|
def check_requirements(self):
|
||||||
"""check system requirements"""
|
"""check system requirements"""
|
||||||
@@ -231,6 +230,18 @@ class Install(AtomicOperation):
|
|||||||
# installed packages
|
# installed packages
|
||||||
packagedb.inst_packagedb.add_package(self.pkginfo)
|
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):
|
def install_single(pkg, upgrade = False):
|
||||||
"""install a single package from URI or ID"""
|
"""install a single package from URI or ID"""
|
||||||
|
|||||||
Reference in New Issue
Block a user