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 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 not ctx.get_option('bypass_ldconfig'): if shared: ctx.ui.info(_("Regenerating /etc/ld.so.cache...")) util.env_update() else: ctx.ui.warning(_("Bypassing ldconfig"))
#!/usr/bin/python # -*- coding: utf-8 -*- # Generates /etc/ld.so.conf and /etc/profile.env according to /etc/env.d directory import sys sys.path.append('.') import pisi.util as util if __name__ == "__main__": util.env_update()