Merge lp:~stgraber/upstart/upstart-inherit-env-no-override into lp:upstart
Status: | Merged |
---|---|
Merged at revision: | 1432 |
Proposed branch: | lp:~stgraber/upstart/upstart-inherit-env-no-override |
Merge into: | lp:upstart |
Diff against target: |
23 lines (+4/-5) 1 file modified
init/job_process.c (+4/-5) |
To merge this branch: | bzr merge lp:~stgraber/upstart/upstart-inherit-env-no-override |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Hunt | Approve | ||
Review via email: mp+148362@code.launchpad.net |
Description of the change
When preparing the test PPA for user session, I noticed that I had a problem
with the new environment inheriting feature.
In my test case, I had DBUS_SESSION_
so upstart with --inherit-env stored that value.
I then used initctl set-env to set it to another value, but this would never be
propagated to the new jobs.
The reason for this is because the inherited environment was appended after any
other environment variables and so would effectively override the "right"
variable as was defined through initctl.
This change simply changes the logic to always apply the inherited environment
first, then have any other environment variables override it.
NOTE: This change is already part of my current PPA packages.
LGTM. Merged.