Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

unsetting an env variable for a builder #465

jgeorgeson ·
I have a command line builder that runs a script which sets LD_LIBRARY_PATH if it is not already set. This is the same script developers use to build so they need to be able to set their own LD_LIBRARY_PATH to override the standard LD_LIBRARY_PATH. The problem is the QB startup seems to set an LD_LIBRARY_PATH of its own (the user we run QB has doesn't have and LD_LIBRARY_PATH set in the login scripts) and that is being used during my build. I've tried setting
LD_LIBRARY_PATH=
and
LD_LIBRARY_PATH=""
in the environment variables setting of the builder, but neither works. I've confirmed that LD_LIBRARY_PATH is already set by adding
env | sort
to the script the builder is running.

So how can I make sure an environment variable is not set before running a builder? What would be really nice is an option on builders to run in a clean environment.
  • replies 3
  • views 2603
  • stars 0
robinshen ADMIN ·
This environment variable might be set by the application server that launches QuickBuild. Just set this variable in environment variables section of the builder does not work as it simply define it as an empty value. To get around of this, you may write the command to execute like below:

sh -c "unset LD_LIBRARY_PATH; /path/to/your/script"

Your suggestion of keeping the command execution environment in QuickBuild same as the command line environment does make sense, and I'll try to implement it in 2.x timeframe.

Regards
Robin
jgeorgeson ·
I think the ideal would be a choice of three options: the full login env of the user the build is running as; the limited env that cron would create; a totally clean env with no variables that aren't set in the builder config.
jgeorgeson ·