Ticket #2320 (closed defect: fixed)
P4Source: ignore PATH
| Reported by: | sanxiyn | Owned by: | bdbaddog |
|---|---|---|---|
| Priority: | patches-accepted | Milestone: | 0.8.+ |
| Version: | 0.8.6p1 | Keywords: | p4 |
| Cc: | bdbaddog |
Description
P4Source's p4bin defaults to "p4", and the manual says "You only need to do this if the perforce binary is not in the path of the buildbot user". This is currently not the case.
P4Source sanitizes environment to include P4* variables and ultimately calls os.execvpe. But "When the environment is being replaced, the new environment is used as the source of the PATH variable" (Python Library Reference). PATH is not included in the sanitized environment.
The end result is that you get an error if your perforce binary is installed at /opt/bin/p4, even if /opt/bin is in PATH. How did this work at all? Because execvpe defaults to confstr(_CS_PATH) if PATH can't be found...
Change History
comment:3 Changed 4 months ago by tom.prince
- Owner set to bdbaddog
- Priority changed from major to patches-accepted
- Status changed from new to assigned
This should be handled in the new master-side P4 step, if appropriate, otherwise closed.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
So we should not be sanitizing PATH when running p4.
Bill, can you take a look?