Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph setup model P2 Director with optional feature requirement
Oomph setup model P2 Director with optional feature requirement [message #1737262] Wed, 06 July 2016 17:39 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
When configuring the setup model, and adding the feature requirement to the P2 Director, we can mark it as optional.
I assume that Eclipse will simply skip it if it cannot resolve it.
The problem is that some times, the repository URL for a particular utility plugin that was marked as optional, is not accessible, due to a transient network issue for example, and the installation in this case stops.

I was expecting that P2 Director setup task would not check if the URL is valid, but instead, it would fail if some non optional feature cannot be resolved.

Otherwise, how can we make a feature optional so Eclipse installation don't stop when the respective URL is not accessible?
Re: Oomph setup model P2 Director with optional feature requirement [message #1737276 is a reply to message #1737262] Wed, 06 July 2016 18:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31005
Registered: July 2009
Senior Member
Silvestre,

The requirements and repository URLs are an orthogonal issue. P2
generally fails when a repository can't be accessed. Up front there is
no way to know which requirements will come from which repositories.
Often one makes a requirement optional so that if the transitively
required things aren't non-optionally required by something else, the
requirement itself need not be resolved. E.g., you might require
something that requires JDT but if JDT isn't directly required or
non-optionally required then JDT won't be installed and the optional
requirement need not be, and won't be, installed. Certainly whether
something is installed depending on the transient state of the network
is not the intent of optional requirements.


On 06.07.2016 19:39, Silvestre Martins wrote:
> When configuring the setup model, and adding the feature requirement
> to the P2 Director, we can mark it as optional.
> I assume that Eclipse will simply skip it if it cannot resolve it.
> The problem is that some times, the repository URL for a particular
> utility plugin that was marked as optional, is not accessible, due to
> a transient network issue for example, and the installation in this
> case stops.
>
> I was expecting that P2 Director setup task would not check if the URL
> is valid, but instead, it would fail if some non optional feature
> cannot be resolved.
>
> Otherwise, how can we make a feature optional so Eclipse installation
> don't stop when the respective URL is not accessible?
>
Re: Oomph setup model P2 Director with optional feature requirement [message #1737348 is a reply to message #1737276] Thu, 07 July 2016 13:07 Go to previous messageGo to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
Ok, I understood the intention of the 'optional' requirements.

Regarding the issue of URL repository setup failing because the URL is not accessible, I assume the only way to bypass this is to create our own P2 repository that we're sure it's always available in our network.

Still regarding optional features as I described it (not the 'optional' attribute you described in the previous post), is there already some request in bugzilla to add this support? I mean, wouldn't be useful to allow the user to unselect some requirements?
For example, not everyone uses Mylyn, why to install it and have more plugins consuming resources?
Re: Oomph setup model P2 Director with optional feature requirement [message #1737365 is a reply to message #1737348] Thu, 07 July 2016 15:03 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31005
Registered: July 2009
Senior Member
Silvestre,

Comments below.


On 07.07.2016 15:07, Silvestre Martins wrote:
> Ok, I understood the intention of the 'optional' requirements.
>
> Regarding the issue of URL repository setup failing because the URL is
> not accessible, I assume the only way to bypass this is to create our
> own P2 repository that we're sure it's always available in our network.
Yes, or we'd need to dig deeper into p2 to see if we can avoid failing
if a repository fails to load. It's most certainly not designed to
behave that way, so not a trivial problem...
>
> Still regarding optional features as I described it (not the
> 'optional' attribute you described in the previous post), is there
> already some request in bugzilla to add this support?
No, and even if there were, it's unlikely to become a priority, unless
there is funding or a contribution.
> I mean, wouldn't be useful to allow the user to unselect some
> requirements?
There is a minimal product with just the platform, no JDT, PDE, nor much
of anything. The other products are generated from the EPP packages.
They contain what they contain. You can most certainly define a user
product that has exactly and only the things you want.
> For example, not everyone uses Mylyn, why to install it and have more
> plugins consuming resources?
Don't choose a product that requires it. Define your own product.

One day, what I'd like to have is an additional page with product
extension, e.g., essentially like the Eclipse Market place. So you
could start with something minimal, choose, all the things you really
want, and install them all in one go. But again, so many good ideas and
so little time for them all.
Previous Topic:How to uninstall a feature permanently
Next Topic:Code Style -> Formatter ->Custom profile not applied by default on linux
Goto Forum:
  


Current Time: Tue Mar 31 16:32:11 GMT 2020

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

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

Back to the top