Ticket #625 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

p4poller ignores environment variables

Reported by: hooaarzt Owned by: krajaratnam
Priority: major Milestone: 0.8.0
Version: 0.7.11 Keywords: perforce
Cc: kovarththanan.rajaratnam@…

Description

I'am trying to set up my buildmaster (on CentOS 5.3; RHEL 5 compatible) to monitor a perforce source tree. Basically, the example from section 5.6 of the buildbot 0.7.11 manual works with my testing perforce server.

Unfortunately my production perforce server uses unicode, so the perforce command line client needs the environment variable P4CHARSET to be set. So I start the buildmaster from within its base dir as follows:

# export P4CHARSET=utf8

# twistd --no_save -y buildbot.tac

When the buildmaster execs the p4 binary, the spawned process does not have P4CHARSET in its environment any more causing the p4 binary to fail. Even other environment variables like DISPLAY are ripped off of the environment. Trying to specify the perforce server and user through the environment variables P4PORT and P4USER does not work either.

I assume, that p4poller runs the p4 binary in a somewhat limited environment.

Attachments

master.cfg Download (1.7 KB) - added by hooaarzt 3 years ago.
master.cfg file of the buildmaster

Change History

Changed 3 years ago by hooaarzt

master.cfg file of the buildmaster

comment:1 Changed 2 years ago by dustin

  • Milestone changed from undecided to 0.8.+

Hmm, this needs some TLC from someone knowledgeable about Perforce.. presumably we need a new config option or two.

comment:2 Changed 2 years ago by krajaratnam

  • Cc kovarththanan.rajaratnam@… added
  • Keywords perforce added
  • Status changed from new to accepted
  • Owner set to krajaratnam

comment:3 Changed 2 years ago by dustin

  • Milestone changed from 0.8.+ to 0.8.0

comment:4 Changed 2 years ago by Kovarththanan Rajaratnam

  • Status changed from accepted to closed
  • Resolution set to fixed

P4Poller: pass through important environment variables (fixes #625)

Previously all variables had to be passed through as command line arguments (through P4Source). Note, environment variables do not have higher precedence than command line arguments, so this shouldn't break any existing users.

Changeset: bc44cbe9fed2cc732098fc12cebc6790d7c43097

Note: See TracTickets for help on using tickets.