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

Bug 320763

Summary: [patch] SelfHostingProfile needs environment properties
Product: [Eclipse Project] PDE Reporter: Gunnar Wagenknecht <gunnar>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public
Version: 3.7   
Target Milestone: 3.7 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch for P2Utils
none
Updated patch none

Description Gunnar Wagenknecht CLA 2010-07-23 15:08:57 EDT
In order to successfully install IUs with environment specific filters the self-hosting profile generated by PDE during launch must contain environment properties.

Relevant element:
org.eclipse.pde.internal.core.P2Utils.createProfile(String, File, Collection)

//		props.setProperty(IProfile.PROP_INSTALL_FOLDER, registryArea.getAbsolutePath());
//		props.put(IProfile.PROP_CACHE, registryArea.getAbsolutePath());
		props.put(IProfile.PROP_INSTALL_FEATURES, Boolean.TRUE.toString());
		// set up environment & NL properly so OS specific fragments are down loaded/installed
		props.put(IProfile.PROP_ENVIRONMENTS, generateEnvironmentProperties());
		props.put(IProfile.PROP_NL, generateNLProperty());

I'm not sure about PROP_INSTALL_FOLDER and PROP_CACHE. They should probably be set as well.
Comment 1 Gunnar Wagenknecht CLA 2010-07-23 15:14:43 EDT
Created attachment 175096 [details]
patch for P2Utils
Comment 2 Curtis Windatt CLA 2010-07-26 10:59:46 EDT
I thought this might be an issue, patch looks reasonable.  Marking for M1.
Comment 3 Curtis Windatt CLA 2010-08-04 12:04:40 EDT
Never got a chance to look at this, will do for M2.
Comment 4 Curtis Windatt CLA 2010-08-09 15:12:41 EDT
Created attachment 176181 [details]
Updated patch

This patch sets the environment properties with less code change.  Gunnar, please give it a try.
Comment 5 Gunnar Wagenknecht CLA 2010-08-10 02:20:35 EDT
(In reply to comment #4)
> This patch sets the environment properties with less code change.  Gunnar,
> please give it a try.

This works as well. But I was wondering if we should set the IProfile.PROP_INSTALL_FEATURES as well? It's usually set in the p2 profiles.
Comment 6 Curtis Windatt CLA 2010-08-10 10:50:00 EDT
(In reply to comment #5)
> This works as well. But I was wondering if we should set the
> IProfile.PROP_INSTALL_FEATURES as well? It's usually set in the p2 profiles.

I don't think that there is any need to have update features in the profile, but it doesn't appear to harm anything, so I will put the property in.

Fixed in HEAD.
Comment 7 Ankur Sharma CLA 2010-09-15 16:35:49 EDT
Verified in I20100915-0100