|
Re: Forcing a P2 Update site inside the Eclipse "Update Sites" preferences [message #1784932 is a reply to message #1784919] |
Fri, 06 April 2018 04:33 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
The preference recorder only records instance-scoped preferences and even the Capture Preferences dialog in the Setup Editor toolbar only shows instance preferences. If you install the Oomph Preferences Management feature, i.e., the IU "org.eclipse.oomph.preferences.feature.group'" , the preferences dialog will include Oomph -> All lPreferences and that has an Edit... button to open the preference explorer editor. That editor has a button in the toolbar to "Keep the editor synchronized with changes to the underlying preference store". This allows you to explore all preferences of all scopes and when any preference is changed, the editor will select the modified preference.
Using this approach you'll see that unfortunately these p2 update URL preferences are stored as profile-scoped preferences. And even worse, the key is an encoded URI of the profile's location on disk. I.e., it depends on where the installation is created. The actual *.pref files are located in the profile's folder so when using a shared bundle pool, they're located in, by default, ~/.p2/org.eclipse.equinox.p2.engine/profileRegistry/*.profile/.data/.settings/*.pref.
Worse still, the content metadata of a product IU can include touch point instructions like this: <instruction key='configure'>
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//download.eclipse.org/releases/latest,name:Latest Eclipse Release,enabled:false);org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//download.eclipse.org/releases/latest,name:Latest Eclipse Release,enabled:false);
</instruction>
It's all definitely not easy to manage or influence as a result of this overall design. Perhaps the URI(s) you don't want are coming from these touch point instructions and you can change that behavior/result by changing their values in your mirror's metadata (content.jar/content.xml.xz).
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
|
Re: Forcing a P2 Update site inside the Eclipse "Update Sites" preferences [message #1785211 is a reply to message #1785155] |
Wed, 11 April 2018 03:38 |
David Coley Messages: 37 Registered: July 2012 |
Member |
|
|
Eike,
thanks this works by the looks of things:
${install.root|uri}/.p2/org.eclipse.equinox.p2.engine/profileRegistry/${installation.location|pathEncode}_eclipse.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
It's a bit of a mouth-full for a path, but it works.
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<setup:ResourceCreationTask
content="eclipse.preferences.version=1
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/url=http\://mydomain.com/dist/eclipseide/update/4.7qa/common/site/
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/enabled=true
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/isSystem=false
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/name=Eclipse 4.7qa Repository"
targetURL="${install.root|uri}/.p2/org.eclipse.equinox.p2.engine/profileRegistry/${installation.location|pathEncode}_eclipse.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs"
encoding="UTF-8"/>
<setup:ResourceCreationTask
content="eclipse.preferences.version=1
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/url=http\://mydomain.com/dist/eclipseide/update/4.7qa/common/site/
repositories/http\:__myweb.ms.com_dist_eclipseide_update_4.7qa_common_site/enabled=true
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/isSystem=false
repositories/http\:__mydomain.com_dist_eclipseide_update_4.7qa_common_site/name=Eclipse 4.7qa Repository"
targetURL="${install.root|uri}/.p2/org.eclipse.equinox.p2.engine/profileRegistry/${installation.location|pathEncode}_eclipse.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs"
encoding="UTF-8"/>
</xmi:XMI>
Wondering if this is worth putting up on the Authoring Wiki as an example similar to PDE example etc.
I really appreciate your quick turnaround for this fix. It has made my life much easier.... until my next roadblock
[Updated on: Wed, 11 April 2018 03:45] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds