Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312447

Summary: Profile as repository from other install results in dropins scanning everything
Product: [Eclipse Project] Equinox Reporter: Andrew Niefer <aniefer>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, irbull
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
patch none

Description Andrew Niefer CLA 2010-05-11 11:12:51 EDT
When loading a profile as a metadata repository, there are several associated artifact repositories that also get loaded.

One is /eclipse/.eclipseextension which I believe represents the dropins into the main eclipse install.

If the profile is being loaded as a repository from some other install, then that /eclipse/.eclipseextension causes the dropins reconcile to process and generate metadata for the entire eclipse/plugins/*.

This seems to be because the 
ExtensionLocationArtifactRepository#getLocalRepositoryLocation
is getting the local repo location based on the running bundle context.  The real location is in the other install, so the bundle data path will be completely wrong and we won't find the existing extension repo .xml
Comment 1 Andrew Niefer CLA 2010-05-11 11:14:37 EDT
The same applies to ExtensionLocationMetadataRepository
Comment 2 Andrew Niefer CLA 2010-05-12 11:57:52 EDT
Created attachment 168180 [details]
patch

I would suggest that when the profile is loaded as a repository, we do not want to add the extension locations to the set of artifact repositories.

In general, it is likely we are going to be loading the profile from another install, so the ExtensionLocationArtifactRepository#getLocalRepositoryLocation will be wrong.  The metadata for any dropped-in bundles should already be synchronized and in the profile
Comment 3 Andrew Niefer CLA 2010-05-12 11:59:11 EDT
BTW, PDE is adding profiles to its list of repositories during build/export which is how this was found.
Comment 4 Andrew Niefer CLA 2010-05-12 15:10:59 EDT
Removing target milestone.

The real problem here isn't so much that we are loading the extension location, but rather than it has no filter and generates metadata for everything instead of just the dropped in things.

I see a few problems here:
1) ExtensionLocationArtifactRepository#getLocalRepositoryLocation is wrong because we are a different install

2) When we create a new location which was the result from (1), we create a local repository without a Site policy, this means we just get a basic DirectoryChangeListener and not a SiteListener with a BundlePoolFilteredListener

3) If we did use a site listener here, the BundlePoolFilteredListener constructor is using the bundle pool for the running install, which again is the wrong answer here.

The profile we are loading knows the location of its bundle pool and that it would want a site policy.  The problem is getting this information over to the extension location code.


This bug originally seemed like a big problem for PDE export/build, which is why it was originally targeted at 3.6.  However, PDE can avoid this problem in most cases by fixing bug 312687
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:36:25 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 6 Eclipse Genie CLA 2021-09-06 00:59:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.