diff -ur webapp-config-1.50.12.orig/WebappConfig/sandbox.py webapp-config-1.50.12/WebappConfig/sandbox.py --- webapp-config-1.50.12.orig/WebappConfig/sandbox.py 2006-03-06 03:59:14.000000000 -0500 +++ webapp-config-1.50.12/WebappConfig/sandbox.py 2006-03-06 14:11:06.000000000 -0500 @@ -26,7 +26,7 @@ import os, string, time -from WebappConfig.wrapper import config_abi +from WebappConfig.wrapper import config_libdir from WebappConfig.debug import OUT @@ -39,8 +39,8 @@ def __init__(self, config): self.config = config - self.__path = ['/usr/lib/libsandbox.so', '/lib/libsandbox.so', - config_abi + '/libsandbox.so'] + self.__path = [config_libdir + '/libsandbox.so', + '/usr/lib/libsandbox.so', '/lib/libsandbox.so'] self.__export = {} self.__write = ['g_installdir', 'g_htdocsdir', diff -ur webapp-config-1.50.12.orig/WebappConfig/wrapper.py webapp-config-1.50.12/WebappConfig/wrapper.py --- webapp-config-1.50.12.orig/WebappConfig/wrapper.py 2006-03-06 04:06:17.000000000 -0500 +++ webapp-config-1.50.12/WebappConfig/wrapper.py 2006-03-06 14:52:59.000000000 -0500 @@ -47,10 +47,19 @@ # Variable for config protected files (used by protect.py) config_protect = portage.settings['CONFIG_PROTECT'] +# Try to derive the correct libdir location by first examining the portage +# variable ABI then using it to determine the appropriate variable to read. For +# example, if ABI == 'amd64' then read LIBDIR_amd64. This routine should work on +# all arches as it sets '/usr/lib' as a fallback. See bugs #125032 and #125156. if 'ABI' in portage.settings.keys(): - config_abi = portage.settings['ABI'] + config_abi = portage.settings['ABI'] + if 'LIBDIR_' + config_abi in portage.settings.keys(): + config_libdir = '/usr/' + portage.settings['LIBDIR_' + config_abi] + else: + # This shouldn't happen but we want to know if it ever does + OUT.die('Failed to determine libdir from portage.settings[\'LIBDIR_' + config_abi + '\']\n') else: - config_abi = '/usr/lib' + config_libdir = '/usr/lib' protect_prefix = '._cfg' update_command = 'etc-update'