Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Specifying a specific set of ws/os/arch for a p2 site
Specifying a specific set of ws/os/arch for a p2 site [message #998098] Wed, 09 January 2013 11:18 Go to next message
Tobias Bertelsen is currently offline Tobias BertelsenFriend
Messages: 25
Registered: October 2011
Junior Member
Hi there.

I will like to create a P2 site for a specific list of ws/os/arch combinations, e.g., win32,win32,x86, and cocoa,macosx,x64 but nothing else.


The situation
As I see the current solution I have these options:
1. Create a P2 site for only only one ws/os/arch combination
2. Use '*' to create a p2 for all platforms.
As all of ws/os/arch differs, I must use */*/*.

As I only have support for win32,win32,x86, and cocoa,macosx,x64 I can do one of two workarounds. Both are pretty bad i my oppinion:
1. Create bogus bundles for all other platforms, and create a p2 site for all platforms, that only work for some
2. Create different p2 sites, meaning more work building and more confusion from the user side.

I have looked in the buckminster source code, more specifically
org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.getConfigurations()
It seems to me, that using '*' is really my only option, but it can be changed rather simple by changing that method.


The question
Am I missing some smart trick, that allows me to specify a specific list of environments?


The suggestion
If it is not possible, could you consider adding this functionality. I'm thinking something like this:
The user specifies a property 'target.environments' with a list of environments, that take priority over the normal ws/os/arch properties:

E.g. The user specifies:
target.environments=win32.win32.x86;cocoa.macosx.x64

In the start of getConfigurations() the following is added:
String environments = props.get("target.environments").toString();
if(environments != null) {
  return environments.split(';');
}




Thanks for all your work Smile
Tobias

[Updated on: Wed, 09 January 2013 11:19]

Report message to a moderator

Re: Specifying a specific set of ws/os/arch for a p2 site [message #998148 is a reply to message #998098] Wed, 09 January 2013 12:51 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2501
Registered: July 2009
Senior Member
I wonder if there may be a misunderstanding. When you are building a p2
site the architectures (etc) are used as filters regarding what to
include in the created p2 repository - it does not mean that all of them
needs to be present.

So, surely, there is never the need to create dummy bundles etc.

Later, when you build a product (if you do), then you build one at a
time with (for each wanted architecture).

In fact, if you have no desire to support some environments (i.e. it
does not actually work) then specify this in your bundles - this way you
prevent them to be installed in an environment you do not support.

Hope that helps
- henrik

On 2013-09-01 12:18, Tobias Bertelsen wrote:
> Hi there.
>
> I will like to create a P2 site for a specific list of ws/os/arch
> combinations, e.g., win32,win32,x86, and cocoa,macosx,x64 but nothing else.
>
>
> The situation
> As I see the current solution I have these options:
> 1. Create a P2 site for only only one ws/os/arch combination
> 2. Use '*' to create a p2 for all platforms.
> As all of ws/os/arch differs, I must use */*/*.
>
> As I only have support for win32,win32,x86, and cocoa,macosx,x64 I can
> do one of two workarounds. Both are pretty bad i my oppinion:
> 1. Create bogus bundles for all other platforms, and create a p2 site
> for all platforms, that only work for some
> 2. Create different p2 sites, meaning more work building and more
> confusion from the user side.
>
> I have looked in the buckminster source code, more specifically
> org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.getConfigurations()It
> seems to me, that using '*' is really my only option, but it can be
> changed rather simple by changing that method.
>
> The question
> Am I missing some smart trick, that allows me to specify a specific list
> of environments?
>
>
> The suggestion
> If it is not possible, could you consider adding this functionality. I'm
> thinking something like this:
> The user specifies a property 'target.environments' with a list of
> environments, that take priority over the normal ws/os/arch properties:
>
> E.g. The user specifies:
> target.environments=win32.win32.x86;cocoa.macosx.x64
> In the start of getConfigurations() the following is added:
>
> String environments = props.get(target.environments).toString();
> if(environments != null) {
> return environments.split(';');
> }
>
>
>
>
> Thanks for all your work :) Tobias
>
Re: Specifying a specific set of ws/os/arch for a p2 site [message #1001210 is a reply to message #998148] Wed, 16 January 2013 08:52 Go to previous messageGo to next message
Tobias Bertelsen is currently offline Tobias BertelsenFriend
Messages: 25
Registered: October 2011
Junior Member
Quote:
... it does not mean that all of them needs to be present.

OK, thought so. I'll try to see if this is actually a problem with our feature structure.

Thanks Smile
Re: Specifying a specific set of ws/os/arch for a p2 site [message #1004270 is a reply to message #998148] Tue, 22 January 2013 22:31 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1417
Registered: July 2009
Senior Member
Let me jump into this thread since I have a similar problem:

say that I want to build my site (and my products) only for these
combinations

os="linux,macosx,win32"
ws="cocoa,gtk,win32"
arch="x86,x86_64"

during materialization (of the TP) I can exclude the other architectures
with advisor nodes, e.g.,

<cq:advisorNode namePattern=".*\.solaris.*" skipComponent="true"/>

and, then equinox launchers (for instance) are not included for these
architectures...

but then, when I build the site.p2 I cannot specify the desired
combinations: I can only specify in the properties file

target.os=*
target.ws=*
target.arch=*

and the action fails due to

No component named
org.eclipse.equinox.launcher.gtk.solaris.sparc:osgi.bundle/[1.1.200.v20120522-1813,1.1.200.v20120522-1813](&(target.arch=sparc)(target.os=solaris)(target.ws=gtk))
is known to Buckminster

how could then avoid this problem?

rationale: I'd have no problem in getting into the TP and in the site.p2
all available combinations, but I'd like to materialize the TP against a
local mirror built with the b3 aggregator (and possibly install the
products reusing this mirror), and, as far as I understand, in the
b3aggr you must specify manually all valid architecture combinations,
you can't just say * (and I'd like to avoid specifying here also the
combinations I'm not interested in).

thanks in advance
Lorenzo

On 01/09/2013 01:51 PM, Henrik Lindberg wrote:
> I wonder if there may be a misunderstanding. When you are building a p2
> site the architectures (etc) are used as filters regarding what to
> include in the created p2 repository - it does not mean that all of them
> needs to be present.
>
> So, surely, there is never the need to create dummy bundles etc.
>
> Later, when you build a product (if you do), then you build one at a
> time with (for each wanted architecture).
>
> In fact, if you have no desire to support some environments (i.e. it
> does not actually work) then specify this in your bundles - this way you
> prevent them to be installed in an environment you do not support.
>
> Hope that helps
> - henrik
>
> On 2013-09-01 12:18, Tobias Bertelsen wrote:
>> Hi there.
>>
>> I will like to create a P2 site for a specific list of ws/os/arch
>> combinations, e.g., win32,win32,x86, and cocoa,macosx,x64 but nothing
>> else.
>>
>>
>> The situation
>> As I see the current solution I have these options:
>> 1. Create a P2 site for only only one ws/os/arch combination
>> 2. Use '*' to create a p2 for all platforms.
>> As all of ws/os/arch differs, I must use */*/*.
>>
>> As I only have support for win32,win32,x86, and cocoa,macosx,x64 I can
>> do one of two workarounds. Both are pretty bad i my oppinion:
>> 1. Create bogus bundles for all other platforms, and create a p2 site
>> for all platforms, that only work for some
>> 2. Create different p2 sites, meaning more work building and more
>> confusion from the user side.
>>
>> I have looked in the buckminster source code, more specifically
>> org.eclipse.buckminster.pde.internal.actor.P2SiteGenerator.getConfigurations()It
>>
>> seems to me, that using '*' is really my only option, but it can be
>> changed rather simple by changing that method.
>>
>> The question
>> Am I missing some smart trick, that allows me to specify a specific list
>> of environments?
>>
>>
>> The suggestion
>> If it is not possible, could you consider adding this functionality. I'm
>> thinking something like this:
>> The user specifies a property 'target.environments' with a list of
>> environments, that take priority over the normal ws/os/arch properties:
>>
>> E.g. The user specifies:
>> target.environments=win32.win32.x86;cocoa.macosx.x64
>> In the start of getConfigurations() the following is added:
>>
>> String environments = props.get(target.environments).toString();
>> if(environments != null) {
>> return environments.split(';');
>> }
>>
>>
>>
>>
>> Thanks for all your work :) Tobias
>>
>


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Re: Specifying a specific set of ws/os/arch for a p2 site [message #1006056 is a reply to message #1004270] Tue, 29 January 2013 16:17 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
My understanding is that you need the equinox launchers for ALL platforms in your tp/ when you build the p2 site, otherwise you get the
No component named
org.eclipse.equinox.launcher.gtk.solaris.sparc:osgi.bundle/[1.1.200.v20120522-1813,1.1.200.v20120522-1813](&(target.arch=sparc)(target.os=solaris)(target.ws=gtk))
is known to Buckminster
that you noticed.

I think the simplest solution is just to accept that, rather than try and trim down your tp/. We did that and it works fine.
Re: Specifying a specific set of ws/os/arch for a p2 site [message #1006410 is a reply to message #1006056] Thu, 31 January 2013 09:33 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1417
Registered: July 2009
Senior Member
On 01/29/2013 05:17 PM, Matthew Webber wrote:
> My understanding is that you need the equinox launchers for ALL
> platforms in your tp/ when you build the p2 site, otherwise you get the
> No component named
> org.eclipse.equinox.launcher.gtk.solaris.sparc:osgi.bundle/[1.1.200.v20120522-1813,1.1.200.v20120522-1813](&(target.arch=sparc)(target.os=solaris)(target.ws=gtk))
>
> is known to Buckminster
> that you noticed.
> I think the simplest solution is just to accept that, rather than try
> and trim down your tp/. We did that and it works fine.

Yes, I understand, and I've also done that.

I was only concerned about the impossibility to create a p2 site for
only some selected platforms (Tycho allows you to do that, for instance).

Furthermore, since it is possible to create a p2 site for just one
platform, I guess it would be nice to have also the possibility to
select only some platforms :)

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Previous Topic:[Buckminster headless] Workspace overlap error
Next Topic:Not able to send email after build runs..
Goto Forum:
  


Current Time: Fri Dec 19 18:16:44 GMT 2014

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

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