Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » p2 director application - blindly pull in all IUs from a repo?
p2 director application - blindly pull in all IUs from a repo? [message #539711] Sat, 12 June 2010 03:18 Go to next message
Troy Nichols is currently offline Troy NicholsFriend
Messages: 28
Registered: July 2009
Junior Member
Hi, p2 director question:

When I run the director (command line) to install an IU from a
particular p2 repo, it requires me to provide the argument -installIU
[some IU], to tell it which things from that repo it should install.

But if I've built my own custom p2 repo (for use just in a build, in my
case), I want to blindly take everything in that repo instead of having
to specify which feature I want. Based on the director application's
available arguments as shown here:

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html

there doesn't seem to be a way to do it. Is there some other way to
(programatically) install *everything* from a given p2 repo into a given
target?

Thanks.
Re: p2 director application - blindly pull in all IUs from a repo? [message #540053 is a reply to message #539711] Mon, 14 June 2010 17:12 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You would have to do this programmatically yourself.

You can take a look at the implementation of that director application, some
minor changes could get it to install everything.

from the org.eclipse.equinox.p2.director.app bundle, the
DirectorApplication#performProvisioningActions() does the install. There
are collections of things to install and things to uninstall.

To get all the IUs from the repo, you would do a query on the repository
like this:
IQueryResult<IInstallableUnit> everything =
collectRootIUs(QueryUtil.createIUAnyQuery());

-Andrew

Troy Nichols wrote:

> Hi, p2 director question:
>
> When I run the director (command line) to install an IU from a
> particular p2 repo, it requires me to provide the argument -installIU
> [some IU], to tell it which things from that repo it should install.
>
> But if I've built my own custom p2 repo (for use just in a build, in my
> case), I want to blindly take everything in that repo instead of having
> to specify which feature I want. Based on the director application's
> available arguments as shown here:
>
>
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html
>
> there doesn't seem to be a way to do it. Is there some other way to
> (programatically) install *everything* from a given p2 repo into a given
> target?
>
> Thanks.
Re: p2 director application - blindly pull in all IUs from a repo? [message #541198 is a reply to message #540053] Fri, 18 June 2010 15:59 Go to previous message
Troy Nichols is currently offline Troy NicholsFriend
Messages: 28
Registered: July 2009
Junior Member
Thanks, Andrew.

Fortunately I think I can avoid that, now that I know a little more
about what's available. For the record, I was able to use the p2.mirror
task to accomplish what I needed, by mirroring the contents of
repositories I needed into my product's build repo, then doing the
product build (with ranged requirements specified in p2.inf).

This article
http://aniefer.blogspot.com/2009/07/composing-and-updating-c ustom-eclipse.html
helped me out a lot, so thanks.

-Troy

Andrew Niefer wrote:
> You would have to do this programmatically yourself.
>
> You can take a look at the implementation of that director application, some
> minor changes could get it to install everything.
>
> from the org.eclipse.equinox.p2.director.app bundle, the
> DirectorApplication#performProvisioningActions() does the install. There
> are collections of things to install and things to uninstall.
>
> To get all the IUs from the repo, you would do a query on the repository
> like this:
> IQueryResult<IInstallableUnit> everything =
> collectRootIUs(QueryUtil.createIUAnyQuery());
>
> -Andrew
>
> Troy Nichols wrote:
>
>> Hi, p2 director question:
>>
>> When I run the director (command line) to install an IU from a
>> particular p2 repo, it requires me to provide the argument -installIU
>> [some IU], to tell it which things from that repo it should install.
>>
>> But if I've built my own custom p2 repo (for use just in a build, in my
>> case), I want to blindly take everything in that repo instead of having
>> to specify which feature I want. Based on the director application's
>> available arguments as shown here:
>>
>>
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html
>> there doesn't seem to be a way to do it. Is there some other way to
>> (programatically) install *everything* from a given p2 repo into a given
>> target?
>>
>> Thanks.
>
Re: p2 director application - blindly pull in all IUs from a repo? [message #606019 is a reply to message #539711] Mon, 14 June 2010 17:12 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You would have to do this programmatically yourself.

You can take a look at the implementation of that director application, some
minor changes could get it to install everything.

from the org.eclipse.equinox.p2.director.app bundle, the
DirectorApplication#performProvisioningActions() does the install. There
are collections of things to install and things to uninstall.

To get all the IUs from the repo, you would do a query on the repository
like this:
IQueryResult<IInstallableUnit> everything =
collectRootIUs(QueryUtil.createIUAnyQuery());

-Andrew

Troy Nichols wrote:

> Hi, p2 director question:
>
> When I run the director (command line) to install an IU from a
> particular p2 repo, it requires me to provide the argument -installIU
> [some IU], to tell it which things from that repo it should install.
>
> But if I've built my own custom p2 repo (for use just in a build, in my
> case), I want to blindly take everything in that repo instead of having
> to specify which feature I want. Based on the director application's
> available arguments as shown here:
>
>
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html
>
> there doesn't seem to be a way to do it. Is there some other way to
> (programatically) install *everything* from a given p2 repo into a given
> target?
>
> Thanks.
Re: p2 director application - blindly pull in all IUs from a repo? [message #606112 is a reply to message #540053] Fri, 18 June 2010 15:59 Go to previous message
Troy Nichols is currently offline Troy NicholsFriend
Messages: 28
Registered: July 2009
Junior Member
Thanks, Andrew.

Fortunately I think I can avoid that, now that I know a little more
about what's available. For the record, I was able to use the p2.mirror
task to accomplish what I needed, by mirroring the contents of
repositories I needed into my product's build repo, then doing the
product build (with ranged requirements specified in p2.inf).

This article
http://aniefer.blogspot.com/2009/07/composing-and-updating-c ustom-eclipse.html
helped me out a lot, so thanks.

-Troy

Andrew Niefer wrote:
> You would have to do this programmatically yourself.
>
> You can take a look at the implementation of that director application, some
> minor changes could get it to install everything.
>
> from the org.eclipse.equinox.p2.director.app bundle, the
> DirectorApplication#performProvisioningActions() does the install. There
> are collections of things to install and things to uninstall.
>
> To get all the IUs from the repo, you would do a query on the repository
> like this:
> IQueryResult<IInstallableUnit> everything =
> collectRootIUs(QueryUtil.createIUAnyQuery());
>
> -Andrew
>
> Troy Nichols wrote:
>
>> Hi, p2 director question:
>>
>> When I run the director (command line) to install an IU from a
>> particular p2 repo, it requires me to provide the argument -installIU
>> [some IU], to tell it which things from that repo it should install.
>>
>> But if I've built my own custom p2 repo (for use just in a build, in my
>> case), I want to blindly take everything in that repo instead of having
>> to specify which feature I want. Based on the director application's
>> available arguments as shown here:
>>
>>
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_director.html
>> there doesn't seem to be a way to do it. Is there some other way to
>> (programatically) install *everything* from a given p2 repo into a given
>> target?
>>
>> Thanks.
>
Previous Topic:Starting DS for use by plug-in
Next Topic:How to create new project for OSGi jar
Goto Forum:
  


Current Time: Fri Nov 28 12:42:19 GMT 2014

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

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