Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Adding reference to other repostiories from p2.inf
Adding reference to other repostiories from p2.inf [message #903363] Thu, 23 August 2012 11:07 Go to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,

I have a Tycho build which produces a p2 repository. Tycho consumes
category.xml and supports p2.inf to tweak the output repository.

I'd like to add a reference to another repository from my p2 repo. It's
basically about adding thise lines to content.xml:
<repository uri='@{associate.site}' type='0' options='1'/>
<repository uri='@{associate.site}' type='1' options='1'/>
It used to be called "associate sites" in site.xml IIRC.

Can someone point me to some example or documentation or help on how to
achieve this operation using a p2.inf?

Cheers,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Adding reference to other repostiories from p2.inf [message #906080 is a reply to message #903363] Fri, 31 August 2012 15:17 Go to previous messageGo to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
Mickael, did you find an answer to this? I'm trying to figure this out as well.
Re: Adding reference to other repostiories from p2.inf [message #906095 is a reply to message #903363] Fri, 31 August 2012 15:54 Go to previous messageGo to next message
Anders Hammar is currently offline Anders HammarFriend
Messages: 12
Registered: August 2012
Junior Member
Doing some reading, I don't think this is currently possible. p2.inf can add repositories post installation but you want them added before the installation starts.

From what I understand, the current best solution is to create a composite repository where you add your repos and also the third party repos.
Re: Adding reference to other repostiories from p2.inf [message #911211 is a reply to message #906095] Tue, 11 September 2012 07:30 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 08/31/2012 05:54 PM, Anders Hammar wrote:
> Doing some reading, I don't think this is currently possible. p2.inf can
> add repositories post installation but you want them added before the
> installation starts.
>
> From what I understand, the current best solution is to create a
> composite repository where you add your repos and also the third party
> repos.

Our current workaround we use consist in modifying the content.jar with
Ant...

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Adding reference to other repostiories from p2.inf [message #917993 is a reply to message #906080] Thu, 20 September 2012 16:24 Go to previous messageGo to next message
Marcos Munoz is currently offline Marcos MunozFriend
Messages: 3
Registered: September 2012
Junior Member
You can go and check http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_actions_touchpoints.html

You can associate the repositories by adding to your p2.inf file the next:

instructions.configure=
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//siteof interest.test.com/,type:0,name:Site Name,enabled:true); \ org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//siteof interest2.test.com/,type:1,name:Site 2 Name,enabled:true); \
Re: Adding reference to other repostiories from p2.inf [message #924203 is a reply to message #917993] Wed, 26 September 2012 15:58 Go to previous messageGo to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Marcos Munoz wrote on Thu, 20 September 2012 19:24
You can go and check http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_actions_touchpoints.html

You can associate the repositories by adding to your p2.inf file the next:

instructions.configure=
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//siteof interest.test.com/,type:0,name:Site Name,enabled:true); \ org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//siteof interest2.test.com/,type:1,name:Site 2 Name,enabled:true); \


I could use this approach when building a product, but p2.inf doesn't work building only a p2.

@Marcos, could you use it to build a p2?
Re: Adding reference to other repostiories from p2.inf [message #924224 is a reply to message #924203] Wed, 26 September 2012 16:23 Go to previous messageGo to next message
Marcos Munoz is currently offline Marcos MunozFriend
Messages: 3
Registered: September 2012
Junior Member
In order to p2.inf be identified and processed by p2. The p2.inf file must be present at the root of the feature and you can build the site using the p2 ant task eclipse.publish.featuresAndBundles (featuresAndBundles). I first created a regular old fashion site with p2 IDE in eclipse and then run the ant task to generate the metadata which includes the touchpoint instructions in the p2.inf.

The p2.inf must be included in the in the build.properties so it can be present in the old fashion update site and processed later by the p2 ant task
Re: Adding reference to other repostiories from p2.inf [message #924285 is a reply to message #924224] Wed, 26 September 2012 17:44 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Well, I'm using tycho. As I said, the p2.inf inside a product project is working properly but not when building a p2.

I've added the p2.inf file in one feature that is contained in the p2's category.xml with this:
instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/);


The generated p2's content.xml has this included, so tycho found the p2.inf:
      <touchpoint id='null' version='0.0.0'/>
      <touchpointData size='1'>
        <instructions size='1'>
          <instruction key='configure'>
            org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:0,location:http${#58}//download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/);org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type:1,location:http${#58}//download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/);
          </instruction>
        </instructions>
      </touchpointData>


But this doesn't help when I go install the feature from the generated p2. I can't install my feature while I don't include the repository by hand. Sad

Previous Topic:HTML Editor
Next Topic:Shared ServletContexts in HTTPService
Goto Forum:
  


Current Time: Tue Apr 16 15:33:05 GMT 2024

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

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

Back to the top