[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Getting shared profile for droplets

On Tue, 2013-07-02 at 11:36 +0200, Pascal Rapicault wrote:
> Not following
Dropins activator has this method:
public static IProfile getCurrentProfile(BundleContext context) {
		IProvisioningAgent agent = getAgent();
		IProfileRegistry profileRegistry = (IProfileRegistry)
agent.getService(IProfileRegistry.SERVICE_NAME);
		if (profileRegistry == null)
			return null;
		return profileRegistry.getProfile(IProfileRegistry.SELF);
	}
But it will return shared profile (or a copy of it) only if I explicitly
drop user profile. Which might be enough for me, but I'd like to be able
to check that it is really a shared profile...

> On 07/02/2013 11:28 AM, Krzysztof Daniel wrote:
> > On Tue, 2013-07-02 at 05:17 +0200, Pascal Rapicault wrote:
> >> getProfile will return you the profile you need.
> >>
> > But getProfile seeems to return current profile, which will correspond
> > to the shared one only after user one had been dropped. Which may be
> > enough given that I'll drop user profile when I discover droplets (or
> > master) change.
> >
> >> On 07/01/2013 01:29 PM, Krzysztof Daniel wrote:
> >>> It's a vital thing to install droplets using shared profile,
> >>> before dropins are processed. I'd like droplets to be a bundle similar
> >>> to dropins (but with different logic). How to get a shared profile while
> >>> being in an activator of a bundle? It looks like IProfile is not aware
> >>> of whether it is shared or not.
> >>>
> >> _______________________________________________
> >> 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


-- 
Krzysztof Daniel <kdaniel@xxxxxxxxxx>
Red Hat