LD_LIBRARY_PATH can already be defined in the runtime environment
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 7 Dec 2017 15:23:11 +0000 (10:23 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 14 Dec 2017 20:24:28 +0000 (15:24 -0500)
Append any value to it.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
lttng_ivc/utils/project.py

index f0b7272666a6b927abe5594e9418067063307173..23627ee6cdaede7b3f6234c3bf0afbc2703101c5 100644 (file)
@@ -120,10 +120,12 @@ class Project(object):
 
         for var, value in self.special_env_variables.items():
             if var in env:
-                # Raise for now since no special cases is known
-                _logger.warning("{} Special var {} is already defined".format(
-                                self.label, var))
-                raise Exception("Multiple definition of a special environment variable")
+                if var == "LD_LIBRARY_PATH":
+                    env[var] = ":".join([env[var], value])
+                else:
+                    _logger.warning("{} Special var {} is already defined".format(
+                                    self.label, var))
+                    raise Exception("Multiple definition of a special environment variable")
             else:
                 env[var] = value
 
This page took 0.02453 seconds and 5 git commands to generate.