Skip to main content

[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> ?

Well, my workaround is to just use Ant to selectively copy from the site dump to a new folder. Download is 60M including the .blobstore (45M without), then the resulting subset zip is 13M.

It's not the most efficient because it pulls 4x as much stuff as I want, but it still only takes about 6 mins when my network is cooperating. :)

http://wiki.eclipse.org/Equinox/p2/Ant_Tasks/Partial_Mirroring/Example

Is there a slicing option to NOT download all the deps and only grab the specified IUs?

---

If I get time to play with this more, I'd like to switch from

a) generating site.xml from the list of features in the folder, then
b) using EclipseGenerator to gen the metadata

to

a) using the Features & Plugins Publisher.

I expect the Publisher will do the same thing but with significantly less code.

N

Andrew Niefer wrote:

Nick,
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='[1.0.0.200907061120,1.0.0.200907061120]'>
          <filter>
            (org.eclipse.update.install.features=true)
          </filter>
        </required>

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" />
        </p2.mirror>

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.

-Andrew


*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>


	
To
	P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc
	
Subject
	[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
option?

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.)

TIA,

--
Nick Boldt :: http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


------------------------------------------------------------------------

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

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


Back to the top