[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] IMetadataRepository settings deleted after update ?


I'm using P2 to support auto-update in my e4 application.
It works almost well.
I realized that sometimes, after an automatic update, my custom update site is removed from the DefaultProfile.profile data in the p2 folder. This implies that at the next check for update, my repo is not checked anymore (I do have a log to display checked repos). The repo is set as the update site of my main feature.

Does anyone have any clue or information on this behavior ?
The complete code for update check is available here : update code on Github

Here are my step :
1. Export the product,
2. Make change, export repository,
3. Run product exported in 1.
4. Check for update, check the log - my custom repo is checked
5. Perform the update, and restart
6. Check for update, my custom repo is non longer checked

I also noticed that the pref file org.eclipse.equinox.p2.metadata.repository in the DefaultProfile.profile folder is changed during this operation. And my custom repo disappears.
The manually added repositories ( using IMetadataRepositoryManager.addRepository(URI) ) are saved in this pref file.
The repositories added in the code by calling a metadatamanager.addRepository(new URI(...)) are also saved in the new preference file.

Is there anything I'm missing ?

Thank you,