From baa0f32a3ecc697322b4ffe3364ed6123d836484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Mon, 24 Oct 2005 21:21:44 +0000 Subject: [PATCH] * update environment iff we got a shared object or something under /etc/env.d --- pisi/atomicoperations.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index a1584ad7..5917d5e9 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -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"""