Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » set additional update sites in p2.inf(Can't get it to work - how to debug it?)
set additional update sites in p2.inf [message #1469164] Tue, 11 November 2014 11:04 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
I am trying to set additional update sites vi p2.inf and addRepository. The generated content.xml has the touchpoint generated, but when I install my plugin the additional sites are not searched.

Is there a way to debug what's going on (normal "debug verbose" log doesn't say anyhing useful) without downloading all the source code and setting breakpoints?

best regards,
Vlad
Re: set additional update sites in p2.inf [message #1469668 is a reply to message #1469164] Tue, 11 November 2014 20:18 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1814
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/11/2014 12:04, Vlad Dumitrescu wrote:
> I am trying to set additional update sites vi p2.inf and addRepository.
> The generated content.xml has the touchpoint generated, but when I
> install my plugin the additional sites are not searched.
>
> Is there a way to debug what's going on (normal "debug verbose" log
> doesn't say anyhing useful) without downloading all the source code and
> setting breakpoints?
>

Hi

If I understand correctly what you did, those update sites will be part
of the update sites that will be available, after your features are
installed, for installing new software (or updating), but they're not
searched for when installing your features.

Hope this helps
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: set additional update sites in p2.inf [message #1469677 is a reply to message #1469668] Tue, 11 November 2014 20:27 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Oh, I see... Thanks!

So I suppose that the only way to provide an update site for things needed before I can install my stuff (besides having the users enter the locations manually) is to have a composite update site, right? That's not so nice because I don't want these dependencies to be visible...

regards,
Vlad
Re: set additional update sites in p2.inf [message #1470555 is a reply to message #1469677] Wed, 12 November 2014 12:32 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1814
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/11/2014 21:27, Vlad Dumitrescu wrote:
> Oh, I see... Thanks!
>
> So I suppose that the only way to provide an update site for things
> needed before I can install my stuff (besides having the users enter the
> locations manually) is to have a composite update site, right? That's
> not so nice because I don't want these dependencies to be visible...

Yes, I know what you mean :)

I think that in the Mars release there are some new features in the PDE
that allows to specify update sites to consult when installing features,
just like you need to. You could check the news of the Mars Milestones.

cheers
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: set additional update sites in p2.inf [message #1470764 is a reply to message #1469164] Wed, 12 November 2014 16:08 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
The addRepository instructions added to an IU are only made available once the installation of the IU has been completed.

So imagine I have a p2 repo at http://foo.com/repo1 which contains an IU that has an instruction to add http://bar.com/repo2. When the user adds repo1 and install something from it, the repo2 will not be consulted.
For repo2 to become active, the user will have to have installed the IU. Once this is done, subsequent provisioning operations will be able to consult repo2.
In a sense, this "addRepository" action is no different than any other action like those that install a plugin, change memory settings, etc.

Now if what you want to do is have repo2 be consulted while content from repo1 is installed, then you need to use the concept of additional repositories. This can be configured through various ways, but I would recommend using the category editor included in Eclipse 4.4 and the most recent version of Tycho. Note that even though the editor support is in 4.4, the generated metadata works with older versions of p2 (e.g. Kepler and probably even before this).

HTH
Re: set additional update sites in p2.inf [message #1471083 is a reply to message #1470764] Wed, 12 November 2014 21:47 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you Pascal, this explanation could be put in the docs (or maybe it's just me and a few others that didn't get it?)

I'll try the additional repositories thing - I hope it works with older Eclipses as I need to support 4.2 too.
Re: set additional update sites in p2.inf [message #1476801 is a reply to message #1471083] Mon, 17 November 2014 11:09 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1814
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 12/11/2014 22:47, Vlad Dumitrescu wrote:
> Thank you Pascal, this explanation could be put in the docs (or maybe
> it's just me and a few others that didn't get it?)
>
> I'll try the additional repositories thing - I hope it works with older
> Eclipses as I need to support 4.2 too.

Hi

to be honest I've been searching for such a feature for a long time, and
I also asked this very forum about that... it's cool it is now possible
to do that, but I agree with Vlad, this should be really documented :)

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: set additional update sites in p2.inf [message #1476811 is a reply to message #1470764] Mon, 17 November 2014 11:17 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1814
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 12/11/2014 17:08, Pascal Rapicault wrote:
> The addRepository instructions added to an IU are only made available
> once the installation of the IU has been completed.
>
> So imagine I have a p2 repo at http://foo.com/repo1 which contains an IU
> that has an instruction to add http://bar.com/repo2. When the user adds
> repo1 and install something from it, the repo2 will not be consulted.
> For repo2 to become active, the user will have to have installed the IU.
> Once this is done, subsequent provisioning operations will be able to
> consult repo2.
> In a sense, this "addRepository" action is no different than any other
> action like those that install a plugin, change memory settings, etc.
> Now if what you want to do is have repo2 be consulted while content from
> repo1 is installed, then you need to use the concept of additional
> repositories. This can be configured through various ways, but I would
> recommend using the category editor included in Eclipse 4.4 and the most
> recent version of Tycho. Note that even though the editor support is in
> 4.4, the generated metadata works with older versions of p2 (e.g. Kepler
> and probably even before this).

Pascal, I don't see such feature in 4.4... are you referring to the one
introduced in 4.5M1? https://www.eclipse.org/eclipse/news/4.5/M1/#PDE

cheers
Lore

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: set additional update sites in p2.inf [message #1479776 is a reply to message #1470764] Wed, 19 November 2014 18:23 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
In case someone reads this later.

* Pascal's suggestion doesn't seem to work for older Eclipse versions, I need to support Juno...
* Using a composite repository is confusing, because my feature ends in the middle of seemingly unrelated stuff. Users should only see what's relevant for them. I couldn't find a way to "uncategorize" the content in the remote repositories.
* Additionally, my dependencies include even "incubation" projects, and these might change unexpectedly causing my code to crash... I want to have a fixed version dependency without having to edit my code whenever something changes elsewhere.

So my solution is something I didn't think it would work, but it does: I included the third-party features (part of the target platform) in my feature and it gets included very nicely in the generated update site. Neat!

regards,
Vlad


Previous Topic:Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins)
Next Topic:Updating sub features of product
Goto Forum:
  


Current Time: Sun Nov 03 17:19:37 GMT 2024

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

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

Back to the top