Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » P2: problems with updating feature-based product
P2: problems with updating feature-based product [message #127306] Wed, 11 March 2009 20:13 Go to next message
Mikhail Kadan is currently offline Mikhail KadanFriend
Messages: 61
Registered: July 2009
Member
Hello.

We have a problem with p2-based updating of feature-based project. Let me
describe our situation in details. Let's assume that we use default
setting in all wizards.

1) Create new Plug-in project based on "RCP Mail Template". Name it
"test.mail".

2) Create new Feature project. Name it "test.mail.feature". Add
"test.mail" plug-in to this feature.

3) Create new Product configuration in "test.mail" plug-in based on
existing product "test.mail.product". Name it "mail.product". Make it
feature-based. Include next features: "org.eclipse.platform",
"org.eclipse.rcp", "org.eclipse.equinox.p2.user.ui", "test.mail.feature"

4) Export this product to "c:/temp/mail" directory with "Generate metadata
repository" checked.

5) Create new "Eclipse Application" launch configuration. Select
"org.eclipse.equinox.p2.director.app.application" in "Run an application"
combobox. Set "Program arguments" to:

-metadataRepository file:C:/temp/mail/repository
-artifactRepository file:C:/temp/mail/repository
-installIU test.mail.product
-destination C:/temp/mail/install
-profile TestMailProfile
-bundlepool C:/temp/mail/install
-profileProperties org.eclipse.update.install.features=true
-p2.os win32
-p2.ws win32
-p2.arch x86
-roaming

Set "VM arguments" to:

-Declipse.p2.data.area=C:/temp/mail/install/p2

Launch this configuration.

7) Ok, we have properly installed and p2-aware application now.

8) Increase version of "test.mail" to "1.0.1"

9) Increase version of "test.mail.feature" to "1.0.1"

10) Remove and then add "test.mail.feature" to "mail.product"
configuration in "test.mail" plug-in. This step is need because product
configurations explicitly stores it and there is no other way to refresh
it from UI.

11) Export this product to "c:/temp/mail" directory with "Generate
metadata repository" checked. This will update repository in
"c:/temp/mail/repository" with actual artifacts.

12) Launch application from "c:/temp/mail/install". Select "Help" ->
"Software Updates...". Go to "Installed software" tab. There is out
product IU named "RCP Product". Press "Update..." button. We will get a
message "There is nothing to update".


Fiasko!


13) Let's try to use update site mechanics then, maybe this will work?
Create new Update site project. Name it "test.mail.updatesite". Add
"test.mail.feature" to it. Click "Build All".

14) Return to our installed application. Select "Help" -> "Software
Updates...". Go to "Available Software" tab. Click "Add site..." ->
"Local...", select our update site location. Greate, we have new update
for our feature with 1.0.1 version. Check it and press "Install...".
Wizard tells us that some errors were found:

Cannot complete the request. See the details.
Feature Feature is already installed, so an update will be performed
instead.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.0,1.0.0]] can be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .0,1.0.0]] can
be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.0,1.0.0]] can be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .0,1.0.0]] can
be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.0,1.0.0]] can be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .0,1.0.0]] can
be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail/[1.0.0,1.0.0]] can be satisfied.
Cannot find a solution where both Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .1,1.0.1]] and
Match[requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .0,1.0.0]] can
be satisfied.
Unsatisfied dependency: [test.mail.product 1.0.0] requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.group/[1 .0.0,1.0.0]
Unsatisfied dependency: [test.mail.feature.feature.group 1.0.0]
requiredCapability:
org.eclipse.equinox.p2.iu/test.mail.feature.feature.jar/[1.0 .0,1.0.0]
Unsatisfied dependency: [test.mail.feature.feature.group 1.0.0]
requiredCapability: org.eclipse.equinox.p2.iu/test.mail/[1.0.0,1.0.0]


Didn't work again.


Ok, some thoughts on this problem then:

15) As we can see from error log from (14), our "test.mail.product"
requires "test.mail.feature" to be exactly version "1.0.0" (as he puts
dependency "[1.0.0,1.0.0]"). When we try to update it to version "1.0.1"
this dependency fails, so fails our update process. This problem appears
because we cannot update our product IU so it will have dependency on
"test.mail.feature" with "1.0.1" version. We just don't know how to
include product in update site in this situation. Maybe this isn't a
reason, and if it is not, then see (16).

16) No more thoughts, sorry :) Can you look into this problem and explain
this street magis please?


Thanks.
Re: P2: problems with updating feature-based product [message #1715140 is a reply to message #127306] Thu, 19 November 2015 14:24 Go to previous message
Franck Malartic is currently offline Franck MalarticFriend
Messages: 8
Registered: September 2012
Junior Member
Hi,

Certainly a bit late for you, but since i am facing the same issue, this can be useful for others:
explanation of what happens is here: https://wiki.eclipse.org/Equinox/p2/FAQ

One solution there: http://aniefer.blogspot.fr/2009/07/composing-and-updating-custom-eclipse.html
If you are using tycho to generate the product: use installMode="root" in the product for "updatable" features as explained in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=361722
Previous Topic:specifying java / jre location for web start in JNLP
Next Topic:configuration file transfer to equinox launcher don't work
Goto Forum:
  


Current Time: Thu Apr 18 23:46:06 GMT 2024

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

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

Back to the top