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?

Some more info on this. I created a new rcp app, and added the relevant bundles. Further I created a trivial fragment bundle and after exporting the app and creating a dropins directory, added the fragment bundle to the dropins directory.

What I'm seeing...the directory watcher is doing it's job, and processBundle method on class org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener gets called when a fragment is put in the dropins directory:

private boolean processBundle(File file, boolean isDirectory, boolean isAddition) { BundleDescription bundleDescription = BundlesAction.createBundleDescription(file);
        if (bundleDescription == null)
            return false;

        advice.setProperties(file, file.lastModified(), file.toURI());
return publish(new BundlesAction(new BundleDescription[] {bundleDescription}), isAddition);
        // TODO see bug 222370
// we only want to return the bundle IU so must exclude all fragment IUs
        // not sure if this is still relevant but we should investigate.
    }

The following line from the above gets executed

return publish(new BundlesAction(new BundleDescription[] {bundleDescription}), isAddition);

and publish() is defined as:

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

The action.perform(...).isOK() returns *true*, but performing this action has no apparent effect...the bundle in the dropins directory is not added to the framework, and I can see that it's also not added to bundles.info file.

I haven't yet debugged into the action.perform, but this is what I'm going to do next. I looked at the bug referenced in the source...it doesn't seem to be related to this issue.

Thanks for any further pointers/info.

Scott



Back to the top