Merge lp:~roadmr/checkbox/897889-environ into lp:checkbox
Status: | Merged |
---|---|
Merged at revision: | 1145 |
Proposed branch: | lp:~roadmr/checkbox/897889-environ |
Merge into: | lp:checkbox |
Diff against target: |
71 lines (+17/-1) 3 files modified
debian/changelog (+3/-1) jobs/wireless.txt.in (+4/-0) plugins/backend_info.py (+10/-0) |
To merge this branch: | bzr merge lp:~roadmr/checkbox/897889-environ |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brendan Donegan (community) | Approve | ||
Review via email: mp+85037@code.launchpad.net |
Description of the change
OK, here's another stab at setting env variables for user: root jobs.
If environ: is specified in a job description, the specified environment variables will be taken from the frontend's environment and put in the backend's env prior to running the job.
I modified the wireless job files (the ones that prompted this madness) to use the new mechanism.
To test this, one could define a job like this:
plugin: shell
user: root
environ: WHATEVER
command: echo "the variable is $WHATEVER"
description: nothing really
put this on a whitelist or something and run:
WHATEVER="anything" checkbox-gtk -W my.whitelist
The test result should contain "the variable is anything" with the environ fix in place, and just "the variable is" without it.
The change is pretty much self-contained, doesn't really interact with any other code in checkbox, and can hopefully be easily backportable to any required branches.
Yeah, we got it!