Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320763 - [patch] SelfHostingProfile needs environment properties
Summary: [patch] SelfHostingProfile needs environment properties
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 15:08 EDT by Gunnar Wagenknecht CLA
Modified: 2010-09-15 16:35 EDT (History)
1 user (show)

See Also:


Attachments
patch for P2Utils (3.17 KB, patch)
2010-07-23 15:14 EDT, Gunnar Wagenknecht CLA
no flags Details | Diff
Updated patch (2.24 KB, patch)
2010-08-09 15:12 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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