Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » updating product and p2.inf
updating product and p2.inf [message #640723] Mon, 22 November 2010 22:05 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Hi,

I am having trouble updating my product via generated update site. So with some help from folks at eclipse irc channel I learned about p2.inf file. If I understand correctly I need p2.inf to make p2 aware of relationship between product and feature. Without adding p2.inf file I would get these errors when updating http://pastebin.com/ait69B55.
After I added p2.inf with version range I can update the product, but couple of things happen:

  • In addition of having product id and version in 'Installed Software' section I also have feature id and version from the update: http://i.imgur.com/yR2Qk.png (Not sure if this is normal or not, but I would think that only root product would get updated with updated version number)
  • Update site in addition to what's been defined in update site feature's build.properties file also includes 'Uncategorized' section for the same feature and all features that are included references of my feature: http://i.imgur.com/yS1Kg.png. Also, about the dependencies. I read in a post on this forum that in order for product's version to be set correctly product needs to have its id and version blank, dependencies should include only the feature that describes the product. This is what I did, but how then I exclude dependency features from update site? If I resort to creating another feature (x.feature) that includes only plugins that make up the product, and make product's feature (x.product.feature) depend on it, and in turn use x.feature for my update site then I don't get dependencies to be part of update site, but the qualifier for the product is not updated.
  • If I try to uninstall update that I just performed, it seems as it goes fine (no errors), but when I relaunch my application feature is still there.

Lastly, am I going in the right direction by custom configuring p2 metadata via p2.inf? May be Buckminster performs this already and I just need to express this in properties when I perform action to build the product?

thanks,
Alex
Re: updating product and p2.inf [message #642582 is a reply to message #640723] Wed, 01 December 2010 20:17 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
I did a sanity check build to see if update will work for the simplest case. All I have is one plugin that has a view with a list (from the plugin wizards). What I did different though is inclusion of p2.inf file in my product feature that looks like this:
requires.1.namespace = org.eclipse.equinox.p2.iu
requires.1.name = com.i.test.feature.feature.group

This fixes this problem http://pastebin.com/ait69B55.

However when I launch the product for the first time, this is what I see: http://i.imgur.com/0ztvR.png

And after update this (notice my plugin feature is outside of the product): http://i.imgur.com/TRadH.png.

Also, there is not new feature in the features directory, just the previous one.
Is there something else I need to include in p2.inf file? May be my product definition is not correct? Or perhaps this is not related to Buckminster at all, then which forum should I post my question on?

Here is the code for my test build: https://code.google.com/p/iskaboo/source/browse/trunk/bucky

thanks,
Alex

Re: updating product and p2.inf [message #643093 is a reply to message #642582] Sat, 04 December 2010 09:10 Go to previous messageGo to next message
Philipp Nanz is currently offline Philipp NanzFriend
Messages: 46
Registered: February 2010
Member
Hi Alex,

your build/product.ant is missing the roaming parameter.
Add

<arg value="-roaming" />

Otherwise the update will be installed into the same directory, where it was compiled on the build server. It isn't picked up there though, that's why P2 *thinks* it has been updated, but the actual bits are missing.

Also it is suggested to get rid of
<jvmarg value="-Declipse.p2.data.area=${destination}/p2" />
<jvmarg value="-Declipse.p2.profile=${profile}" />

unless you are using an antiquated version of Bucky.

Hope that helps!

Kind regards,
Phil

[Updated on: Sat, 04 December 2010 09:11]

Report message to a moderator

Re: updating product and p2.inf [message #643095 is a reply to message #643093] Sat, 04 December 2010 09:17 Go to previous messageGo to next message
Philipp Nanz is currently offline Philipp NanzFriend
Messages: 46
Registered: February 2010
Member
And about the p2.inf: It's definitely useful for adding p2 metadata but definitely not required to get the update mechanism working (given that you provide the update site URL via some other means).

I myself use it only for configuring the update site URL as well as the min Java version and the default workspace dir.

So I would suggest not to mess with version ranges there unless you really need to.

[Updated on: Sat, 04 December 2010 09:18]

Report message to a moderator

Re: updating product and p2.inf [message #643345 is a reply to message #643095] Mon, 06 December 2010 15:28 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Thank you Philipp!

Tries your suggestions and update site works! In fact when I did search on roaming argument, I got this post (http:// www.eclipse.org/forums/index.php?t=msg&goto=557057&S =c950f0b8a37edd108e943a55e349cd58) that describes my very same problem and your exact solution Smile I don't how I didn't find it before. All of this brings me to final question, are there good articles that would help me learn p2 trickery?

Thanks again for your help!
Alex
Re: updating product and p2.inf [message #643392 is a reply to message #643345] Mon, 06 December 2010 17:25 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Hi Philipp,

Actually the problem seems to be still there in some form. What happened was that I did not remove p2.inf from the product feature, and that's why update site worked. However, product was not updated but the feature. So when I removed p2.inf and tried update again I got this error:
Quote:

Your original request has been modified.
"Feature" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: Feature 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J (com.i.test.product.feature.feature.group 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J)
Software currently installed: test 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J (com.i.plugin.product 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J)
Only one of the following can be installed at once:
Feature 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J (com.i.test.product.feature.feature.jar 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J)
Feature 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J (com.i.test.product.feature.feature.jar 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J)
Cannot satisfy dependency:
From: test 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J (com.i.plugin.product 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J)
To: com.i.test.product.feature.feature.group [1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J]
Cannot satisfy dependency:
From: Feature 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J (com.i.test.product.feature.feature.group 1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J)
To: com.i.test.product.feature.feature.jar [1.0.0.201012061152-79792cINUk-9GFQ4dqCCA8BW8E2J]
Cannot satisfy dependency:
From: Feature 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J (com.i.test.product.feature.feature.group 1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J)
To: com.i.test.product.feature.feature.jar [1.0.0.201012061206-79792cINUk-9GFQ4dqCCA97a8E2J]



I think the problem here is that update site includes the feature and not the product. When I try updating LogSaw application I see that what is being updated is the product and not the feature. I believe this is what I need to achieve, but how do I make update site include the product and not the feature?

thanks,
Alex
Re: updating product and p2.inf [message #643397 is a reply to message #643392] Mon, 06 December 2010 18:25 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Ok, I understand now exactly what's going.

The way I was doing update (locally) is by using "Install New Software..." and adding p2 repository thinking that that will be used for update. I was wrong. Install New Software is used just for that - to install new software. To make this work I had to add p2 location in Install New Software, and then go to Check for Updates and then update site would be consulted. This is according to this http://tomsondev.bestsolution.at/2010/07/25/p2-i-love-you/

I don't understand why the two steps could not be consolidated into one though? Oh well, at least it works now.

Thanks,
Alex
Re: updating product and p2.inf [message #643417 is a reply to message #643397] Mon, 06 December 2010 18:44 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
The way I understood this is that users typically do not want to update
when installing new functionality - i.e. install new software favors a
solution that keeps what is installed if possible.

- henrik

On 12/6/10 7:25 PM, Alex wrote:
> Ok, I understand now exactly what's going.
>
> The way I was doing update (locally) is by using "Install New
> Software..." and adding p2 repository thinking that that will be used
> for update. I was wrong. Install New Software is used just for that - to
> install new software. To make this work I had to add p2 location in
> Install New Software, and then go to Check for Updates and then update
> site would be consulted. This is according to this
> http://tomsondev.bestsolution.at/2010/07/25/p2-i-love-you/
>
> I don't understand why the two steps could not be consolidated into one
> though? Oh well, at least it works now.
>
> Thanks,
> Alex
Re: updating product and p2.inf [message #644005 is a reply to message #643417] Thu, 09 December 2010 02:58 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
I see. Wonder if would make sense to add some kind notification or delegate to update for users who don't know. I really didn't know that because never used update mechanism before Smile
Previous Topic:Broken namespace link
Next Topic:.eclipseproduct missing
Goto Forum:
  


Current Time: Tue Apr 16 18:34:45 GMT 2024

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

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

Back to the top