[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Querying p2 for a list of reverse requirements

Thanks, Paul and Mengxin Zhu!

With your help I was able come up with the following two queries to separately list feature groups and plugins which respectively include or require a given p2 IU.
everything.select(iu | iu.properties['org.eclipse.equinox.p2.type.group']==true && iu.requirements.exists(rc | everything.exists(x | x.id=='org.eclipse.emf.ecore' && x ~= rc)))
everything.select(iu | iu.properties['org.eclipse.equinox.p2.bundle.localization']=='plugin' && iu.requirements.exists(rc | everything.exists(x | x.id=='org.eclipse.emf.ecore' && x ~= rc)))


Furthermore, it is possible to make them run much faster if org.eclipse.emf.ecore is only sought once, e.g.
everything.select(everything.latest(x | x.id=='org.eclipse.emf.ecore').first(y | true), _, {req, iu | iu.properties['org.eclipse.equinox.p2.type.group']==true && iu.requirements.exists(rc | req ~= rc)})
everything.select(everything.latest(x | x.id=='org.eclipse.emf.ecore').first(y | true), _, {req, iu |iu.properties['org.eclipse.equinox.p2.bundle.localization']=='plugin'  && iu.requirements.exists(rc | req ~= rc)})


I'm happy now!

/Mikhail



From: "Mengxin Zhu" <kane.zhu@xxxxxxxxxxxxx>
To: p2-dev@xxxxxxxxxxx
Sent: Wednesday, February 20, 2013 9:49:28 AM
Subject: Re: [p2-dev] Querying p2 for a list of reverse requirements

IU 'Tooling.xx' is a kind of config IU, which takes responsible to update eclipse.ini, set start level and etc. They have requirements to match any bundle, what's why they are queried.

Try below line to exclude config IUs and feature groups,

provlpquery  this "everything.select(iu | iu.providedCapabilities.exists(p | p.namespace == 'osgi.bundle')  && iu.requirements.exists(rc | everything.exists(x | x.id=='org.eclipse.emf.ecore' && x ~= rc)))" true
Mengxin Zhu
On 02/20/2013 08:40 AM, Paul Webster wrote:
AFAIK the all of the IUs that start with tooling can be ignored3 (they're generated by PDE build, although their purpose escapes me at the moment).  If you remove them, then your list is more reasonable.

PW

--
Paul Webster
Hi floor.  Make me a sammich! - GIR

_______________________________________________
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