WAF: when changing environment (e.g. LD_LIBRARY_PATH for --run and --shell), make the new paths take precedence over the old ones.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 01 Aug 2007 18:34:23 +0100
changeset 1015 dfe3c1e5a4b8
parent 1014 a19d3c07c95d
child 1016 58a56b52a08b
WAF: when changing environment (e.g. LD_LIBRARY_PATH for --run and --shell), make the new paths take precedence over the old ones.
wscript
--- a/wscript	Wed Aug 01 19:52:59 2007 +0200
+++ b/wscript	Wed Aug 01 18:34:23 2007 +0100
@@ -215,7 +215,7 @@
     os_env = dict(os.environ)
     if pathvar is not None:
         if pathvar in os_env:
-            os_env[pathvar] = pathsep.join([os_env[pathvar]] + list(env['NS3_MODULE_PATH']))
+            os_env[pathvar] = pathsep.join(list(env['NS3_MODULE_PATH']) + [os_env[pathvar]])
         else:
             os_env[pathvar] = pathsep.join(list(env['NS3_MODULE_PATH']))