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

Bug 319447

Summary: setTargetPref allows bogus values
Product: z_Archived Reporter: Miles Parker <milesparker>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Miles Parker CLA 2010-07-09 19:17:48 EDT
To reproduce:

setpref targetPlatformPath=/Users/foo/bogus

Note that console reads:

targetPlatformPath set to the value '/Users/foo/bogus'

When target prefs are set to a non-existent location, Buckminster continues executing without complaint. Because the ramp will then try (and sometimes succeed) at finding other dependencies, this makes it very difficult to determine what the issue is.

Buckminster should provide Error.
Comment 1 Thomas Hallgren CLA 2010-07-19 04:26:27 EDT
It's not uncommon that a build assumes that the target platform is non-existent and should be created and provisioned as part of the build. As part of that, Buckminster creates the directory if it's missing. Changing this behavior would break several builds.

Would it be sufficient if a warning was issued? Something like:

"WARNING: Target platform directory '/Users/foo/bogus' does not exist and will be created"
Comment 2 Miles Parker CLA 2010-07-19 20:07:54 EDT
Yes, it makes sense that this should be an allowed value.

(In reply to comment #1)
> Would it be sufficient if a warning was issued? Something like:
> 
> "WARNING: Target platform directory '/Users/foo/bogus' does not exist and will
> be created"

Yes, that would be great. Even if it simply added that information to the line reporting the setting, e.g.

"targetPlatformPath set to the value '/Users/foo/bogus' (warning: no platform exists at that location)"
Comment 3 Thomas Hallgren CLA 2010-07-20 02:21:31 EDT
I made two alterations:

1. I added an explicit warning message since the "targetPlatform set to the value ..." message was a generic message printed on stdout by all setpref commands.
2. I changed the generic message to be a logger debug message.

The fix is committed to helios-maintenance, rev 11505.