Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] use of dropins support in rcp app?

Hi Folks,

In the class org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform method is this code...that is ultimately called by the RepositoryListener when a bundle is placed in the dropins folder:

public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
        if (bundles == null && locations == null)
throw new IllegalStateException(Messages.exception_noBundlesOrLocations);

        setPublisherInfo(publisherInfo);

        try {
            if (bundles == null)
bundles = getBundleDescriptions(expandLocations(locations), monitor);
            generateBundleIUs(bundles, results, monitor);
            bundles = null;
        } catch (OperationCanceledException e) {
            return Status.CANCEL_STATUS;
        }
        return Status.OK_STATUS;
    }

When I step into this code with my RCP application, it seems to execute and complete just fine, and returns OK_STATUS...i.e. generateBundleIUs completes successfully. But afaict, the IUs aren't actually installed via p2...that is the IUs get created by this code, but once created nothing is done with them. Then the method: org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.publish(IPublisherAction, boolean)

which is defined as

    private boolean publish(IPublisherAction action, boolean isAddition) {
        IPublisherResult result = isAddition ? iusToAdd : iusToChange;
return action.perform(info, result, new NullProgressMonitor()).isOK();
    }

returns ok, and the newly added bundle/jar completes successfully...apparently without doing anything...and this is what I'm seeing...that in this rcp application, when a bundle is added to the dropins directory all of this code gets called (by the directorywatcher/reconciler), but nothing is actually installed into the rcp application.

Is there other code that's supposed to be triggered when a bundle is added to dropins?...and that then uses this newly created IU to actually install it?

Note this is with the 3.6.2 publisher/BundlesAction code. I'm going to try on 3.7 next to see if anything is different.

Thanks,

Scott

On 3/24/2011 8:02 AM, Scott Lewis wrote:
Hi DJ,

On 3/24/2011 5:59 AM, DJ Houghton wrote:

Hi Scott,

We did have some problems in the past where the bundles were already loaded and the fragments only worked on the 2nd invocation [1] as well as recently where the fragments were providing translations to the fragment.xml file (rather than for Java code) [2] but both those issues should be resolved.


Currently, 3.6.2 is being used as the target platform...so perhaps [2] (or some other older problem) is an issue. I will try on 3.7 stream today.


Is the ProfileChangeRequest being created corrected? The method #getAllIUsFromRepos() is also interesting because it should be including your drop-ins folder (and new IUs) in its search.


I will debug into the publisher BundleAction execution today. I may also open a bug and attach a trivial RCP app that shows the problem...so that others can reproduce.

Thanks,

Scott


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



Back to the top