Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329914

Summary: undefining environment variables for a remote C/C++ makefile project doesn't work
Product: [Tools] PTP Reporter: Chris Recoskie <recoskie>
Component: RDTAssignee: Chris Recoskie <recoskie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ptp-inbox, vivkong
Version: 4.0.4   
Target Milestone: 4.0.5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch recoskie: iplog-

Description Chris Recoskie CLA 2010-11-10 10:31:44 EST
Go to the project properties->C/C++ Build->Environment property page, and undefine an environment variable.  The variable's original value from the shell is still passed to the remote process even though you theoretically undefined it.

There is some legacy code (copied from the CDT make builder - no longer used BTW) in the remote make builder checks the make info to see whether it should override the environment or just append to it.  Since the value never gets set to specify that the environment should be replaced, the code that clears out the remote environment so that the one specified by the user takes over entirely is never called.

The solution is to always clear the remote environment.  The list the user edited will have already contained the remote environment, so their edits should be fully respected.
Comment 1 Chris Recoskie CLA 2010-11-10 10:36:32 EST
Created attachment 182821 [details]
patch
Comment 2 Chris Recoskie CLA 2010-11-10 11:46:19 EST
Fixed on ptp_4_0 and HEAD