Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323047 - [repository] P2 repository preferences issue
Summary: [repository] P2 repository preferences issue
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 11:02 EDT by Suganya Devi CLA
Modified: 2019-07-15 05:34 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Suganya Devi CLA 2010-08-18 11:02:18 EDT
Build Identifier: 3.6.0 I20100608-0911

I have multiple problems with P2 preferences in my Application (based on product build)

I have a separate build project (releng). The build creates a local repository in the build project. After the build is successful, the idea here is to copy the repository to our application specific URL. 

 - In my p2.inf file, I have addRepository entries pointing to my application specific URL. I have only 2 lines in my P2.inf, one pointing to artifacts repository and other to metadata repository
 - In my build script, I have "p2.build.repo" pointing to my local repository
 - When I run the build all I'm expecting in org.eclipse.equinox.p2.artifact.repository.prefs & org.eclipse.equinox.p2.metadata.repository.prefs is to point to the repository I have specified in my p2.inf

But, the preferences inconsistent and has repository information about my local repository, eclipse update site and application final repository. Also these things keep changing for every build, sometimes I see all these entries, sometimes it ignores my local repository and points to the default repository URI provided by the product build. I'm so confused and tired. I also found org.eclipse.pde.build.container.feature/product/p2.inf has  inconsistent and varying repository information for each build when the build script is not changed

I would like my application to point only to the repository i have specified in P2.inf. How to do this?


Reproducible: Always
Comment 1 Suganya Devi CLA 2010-08-18 11:38:58 EDT
Also, its caching the old repository information I specified in my P2.inf file. Because it kept using the old repository information. I restarted my eclipse workspace and started the build, now it's not even showing my repository information I have specified in the p2.inf, shows only eclipse update site. I'm confused because, I see my repository information in org.eclipse.pde.build.container.feature/product/p2.inf
Comment 2 Suganya Devi CLA 2010-08-23 09:31:28 EDT
I noticed that the previous repository information is cached in ${workspace}\.metadata\.plugins\org.eclipse.search\dialog_settings.xml.

Even though I change the repository URL in my P2.inf, its (incl) adding previous repository information found in the cache.
Comment 3 Suganya Devi CLA 2010-08-25 16:27:58 EDT
The cache is cleared only on restarting the workspace.
Comment 4 DJ Houghton CLA 2010-08-26 11:44:17 EDT
Paul, do you know what might be going on here? This seems strange to me. I think that is the IMemento storage file so I have no idea why there would be repository information stored in a memento in the search bundle.
Comment 5 Paul Webster CLA 2010-08-26 13:32:10 EDT
(In reply to comment #4)
> Paul, do you know what might be going on here? This seems strange to me. I
> think that is the IMemento storage file so I have no idea why there would be
> repository information stored in a memento in the search bundle.

The only reason for them to be mentioned in search is that they were searched for.  Nothing in p2 will read stuff out of search.  If you show us a segment of the file you are concerned about though, we could be sure.

In general, there should be prefs under p2/org.eclipse.equinox.p2.engine and p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile in your install that show repos.  If you upgrade from build to build, won't they just accumulate?

PW
Comment 6 Suganya Devi CLA 2010-08-26 13:59:08 EDT
Eclipse prefs under p2/org.eclipse.equinox.p2.engine will have information about the repositories added to Eclipse IDE. But I'm talking about the repositories that I have added to my RCP application.

The P2.inf in our application will change based on the environment (dev, QA...), the problem is that even though I change the repo information for each build, Eclipse is using only the initial repositories specified in our P2.inf file. If I restart the workspace, it works fine.
Comment 7 Pascal Rapicault CLA 2010-08-29 21:03:47 EDT
This looks like something that we should investigate for 3.7
Comment 8 Pascal Rapicault CLA 2011-05-02 14:02:25 EDT
No time in 3.7.
Comment 9 Eclipse Genie CLA 2019-07-15 05:34:50 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.

--
The automated Eclipse Genie.