[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] HOWTO: use <p2.mirror><slicingOptions filter="..."/></p2.mirror> ?

This filter attribute is going to be matched against the  LDAP <filter> elements which can be attached to an IU and on IU requirements..  
For example, feature groups have a filter on the requirement to the feature jar :
        <required namespace='org.eclipse.equinox.p2.iu' name='g.feature.jar' range='[,]'>

And fragments have their "Eclipse-PlatformFilter" as a filter on the IU itself.

Both the "filter" and "platformFilter" attributes end up setting the same thing internally, which is a dictionary of name=value pairs that we will evaluate the LDAP filters against.
Setting platformFilter="win32,win32,x86"  is the same as setting filter="osgi.ws=win32,osgi.os=win32,osgi.arch=x86".

I don't think we have anything that will do what you want (ie mirror "*svn*").  The closest thing we have, is the <iu> element which is supported by both p2.mirror and p2.repo2runnable.
This is used to list the IUs you want to include in the operation (before slicing), it has a "query" attribute.  Currently, the only supported query is against properties on the IUs.  For example, pde.build uses a mirror call like:
        <p2.mirror  ... >
                <iu query="property[@name='org.eclipse.equinox.p2.type.category']" required="false" />

This matches any IU which has the property "org.eclipse.equinox.p2.type.category".  The syntax here is intended to be "xpath-like", and we currently support
         property[@name='property-name' @value='property-value']

I doubt the svn plugins have a common property that you can query on.

This query attribute is probably the place where we could look at supporting some kind of wildcard matching.


Nick Boldt <nickboldt@xxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

07/20/2009 05:37 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

P2 developer discussions <p2-dev@xxxxxxxxxxx>
[p2-dev] HOWTO: use <p2.mirror><slicingOptions filter="..."/></p2.mirror> ?

I've looked high and low and can't find an example of <slicingOptions
filter="..."/>, only platformfilter="win32,win32,x86" and similar.

help.eclipse.org only says:

> Set additional filter properties. Format is a comma separated
> list of "key=value" pairs.

But what should one put in there? I'm trying to mirror a subset of a set
of repos and extract ONLY the features/plugins with "*svn*" in their
name (featureid, pluginid, or filename). Is that possible w/ the filters

Or is there some other way, like using p2.repo2runnable instead of
p2.mirror? (I'd prefer a repo, but I'll settle for a runnable if I can't
mirror and filter.)


Nick Boldt :: http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena
p2-dev mailing list