Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » How to update after merging two features?
How to update after merging two features? [message #1758122] Thu, 23 March 2017 17:38 Go to next message
Julien HENRY is currently offline Julien HENRYFriend
Messages: 11
Registered: July 2009
Junior Member
Hi guys,

My update site used to contain 2 features, and now I kept only one, putting all plugins in the remaining one.

Before:
  A.feature 1.0
     / a.plugin 1.0
  B.feature 1.0
     / b.plugin 1.0


After:
  A.feature 2.0
     / a.plugin 2.0
     / b.plugin 2.0


I would like to offer smooth update experience for the end users. Currently the update fail, saying that B.feature 1.0 depends on b.plugin 1.0 and so b.plugin 2.0 can't be installed at the same time.

I discovered the possibility to tune p2 behavior. So I tried to add a p2.inf file in the remaining feature, with:
update.matchExp=providedCapabilities.exists(pc | pc.namespace \=\= 'org.eclipse.equinox.p2.iu' && (pc.name \=\= 'B.feature' || pc.name \=\= 'A.feature' && pc.version < '$version$'))


But it doesn't change anything. I found many projects using this functionality to rename a single feature (A updated by B). Is it supported in my use case (A+B updated by A)?

Thanks


Re: How to update after merging two features? [message #1758405 is a reply to message #1758122] Tue, 28 March 2017 13:01 Go to previous messageGo to next message
Eclipse UserFriend
I'm definitely not a p2ql expert, but I'd have expected the closing bracket around the pc.name checks, like:
(pc.name \=\= 'B.feature' || pc.name \=\= 'A.feature') && pc.version < '$version$'

If that doesn't work, then I think you'd best post this to the p2-dev list.

Brian.
Re: How to update after merging two features? [message #1758408 is a reply to message #1758405] Tue, 28 March 2017 13:18 Go to previous message
Julien HENRY is currently offline Julien HENRYFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Brian,

In fact, after spending hours on this topic, I discovered that the behavior depends if you are using "Check for update" or "Install new software" paths.

With the update.matchExp entry, "Check for update" scenario is more or less ok. It says that installation can't be done, and that other options will be calculated. After a (very) long time it finally suggest that A should be upgraded and B uninstalled. So the final result is acceptable, it is just slow and not user friendly IMHO.

"Install new software" fails with a cryptic dependency error, and not even proposing to uninstall the old feature.

So I will rely on documentation to help the migration...
Previous Topic:Impact of replacing artifacts from an update site
Next Topic:Eclipse Installer by oomph (Eclipse Indigo 3.7)
Goto Forum:
  


Current Time: Tue Dec 03 14:53:42 GMT 2024

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

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

Back to the top