Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Targlets and p2 profiles
Targlets and p2 profiles [message #1797468] Wed, 31 October 2018 10:17 Go to next message
Lasse Knudsen is currently offline Lasse KnudsenFriend
Messages: 3
Registered: October 2018
Junior Member
Hi,

I am currently trying to use targlets to set the target platform for our development and I am facing problems with the following scenario.

Scenario
We are are developing plugins for an RCP coming from another vendor. This RCP is patched several times a year but the problem is that they are not upding the version numbers correctly so that p2 is recoginizing the newer plugins and thinks the existing ones does not need to be updated.

In the past we did not used bundle pools an then I only needed to delete the folder:
.metadata\.plugins\org.eclipse.pde.core

The problem with that solution is that every workspace has a complete target platform bundle pool. Which can be several GB of plug-ins. With targlets I want to be able share those plug-ins between workspaces.

What I did so far:
- Creating a targlet pointing to the p2-repository that contains the whole RCP
- Updating the OOMPH setup in the targlet to the new p2 repository containing the new plugins
- Making an update via oomph but the targlet resolvement is not picking the new ones up because the version pf the plugins have not been changed.

Questions:

1.. Is it possible to reset or remove a profile that contains athe bundles of a targlet so that the oomph update reusing the target to pick up the newer versions?
2. Can I use different bundlepools for the eclipse installation and the targlets so that I only need to delete the targlet bundlepool and use the oomph updater to recreate that bundle pool based on the new plugins?
3. Are there other ways of forcing a complete override or update?
4. I also have seen that after the update of the targlets new versions are only picked up after triggering a reload of the target platform. Can this be triggered by the oomph updater so that this manual step has not to be done anymore?

Regards
Lasse

Re: Targlets and p2 profiles [message #1797568 is a reply to message #1797468] Thu, 01 November 2018 20:23 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6445
Registered: July 2009
Senior Member
Hi Lasse,

I can't resist to say that not increasing the version of an IU when new content is released is a no no. You should really talk to your vendor in the first place. Otherwise profile update just can't work; neither in the target platform of your IDE, nor in the installations of your application (i.e., self update). I mean, it's not just a problem of the pool and its artifacts.

You could try to mirror your vendor's p2 repository and post process it to fix their mess. But then you could lose your vendor's signatures.

You can configure Oomph to use a separate pool and/or agent for all targlet containers in all your workspaces. I haven't tried it, but if you want to take this approach I strongly recommend to use a separate agent as well (because of the profile problems I mentioned above). The steps are:

1) Create a new agent and pool. In your IDE have a look at Preferences | Oomph | Bundle Pools. The Eclipse Installer also provides "Manage Bundle Pools..." actions.

2. Add the following lines to the file {user.home}/.eclipse/org.eclipse.oomph.p2/defaults.info and replace {new.agent} with the new agent's location.

org.eclipse.oomph.targlets.core={new.agent}/pool
org.eclipse.oomph.targlets.core\:agent={new.agent}


I'm not quite sure how badly existing target platforms are impacted by this treatment.

Cheers
/Eike


Re: Targlets and p2 profiles [message #1797592 is a reply to message #1797568] Fri, 02 November 2018 11:53 Go to previous messageGo to next message
Lasse Knudsen is currently offline Lasse KnudsenFriend
Messages: 3
Registered: October 2018
Junior Member
Hi Eike,

thx for your respose. I totally agree with your "no, no" :-) But that is not an option right now and might only work in the upcoming releases.

The option with the targlets pool and agent sounds interesting.
* Is it possible to define an agent and pool during the installation so that I don't have to set it manually?
* Is it possile to link targlet configurations via href in the projectCatalog? I would like to generate the targlet tasks on the build server with all URLs to the p2 repositories.
* Currently we are generating target platforms but I would like to use targlets instead.

Regards
Lasse

[Updated on: Fri, 02 November 2018 12:23]

Report message to a moderator

Re: Targlets and p2 profiles [message #1797603 is a reply to message #1797592] Fri, 02 November 2018 14:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6445
Registered: July 2009
Senior Member
The defaults.info file is a registry for machine-wide, per client, default agent locations. If you register a separate agent location for the Targlets Core client in that file then there's no need anymore to select anything else during an istallation or update. Note again, that you can't register per installation defaults. Of course you can try to change the defaults.info file through a setup task during the bootstrap trigger. ResourceCreationTask or TextModifyTask could do the trick.

Perhaps it's possible to use a containment proxy to factor a task in its own separate resource. At least SetupTaskContainer.getSetupTasks() is modeled with resolveProxies="true". But I haven't tried it out and am not sure how the complex setup machinery would react. I'll ask Ed to comment, too.


Re: Targlets and p2 profiles [message #1797627 is a reply to message #1797603] Fri, 02 November 2018 23:53 Go to previous messageGo to next message
Lasse Knudsen is currently offline Lasse KnudsenFriend
Messages: 3
Registered: October 2018
Junior Member
Hi Eike,

I got the separation of eclipse bundles and the targlets to work by attaching the two lines to the existing defaults.info. Thx for the hint.

Then I have onlyone question left from my previous questions :-)
Is there a way that the resolved targlet is activated and reloaded automatically? For me it seems that when the targlet is resolved it is still not usable until the reload button is pressed on the Target Platform preference page.

Regards
Lasse
Re: Targlets and p2 profiles [message #1797630 is a reply to message #1797627] Sat, 03 November 2018 02:19 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6445
Registered: July 2009
Senior Member
I never (have to) use the Reload button. Is your target definition active before and after performing the TargletTask?

Previous Topic:Oomph issues with SimRel 2018-12 Milestone 1
Next Topic:Complete versioning support of target / targlet with OOMPH ?
Goto Forum:
  


Current Time: Mon Sep 23 01:32:41 GMT 2019

Powered by FUDForum. Page generated in 0.02335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top