Bug 16696 - Bad platform.cfg after restore
Summary: Bad platform.cfg after restore
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 major (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-21 17:01 EDT by Christophe Elek CLA
Modified: 2002-05-29 08:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Elek CLA 2002-05-21 17:01:46 EDT
0521
Install Alphabet 1.0.0 in platform:/base: site (unzip)
start
Update to Alphabet 2.0.0 in C:\Temp
revert to previous
Platform.cfg doesn't Exclude C:\TEMP (Alphabet 2.0.0) plugins
but the siteEntry is in platform.cfg
Comment 1 Christophe Elek CLA 2002-05-21 17:21:35 EDT
Ok,

when we install Alph 1, we have one site with Alph 1 enable
when we install Alph 2, we have 2 sites with Alph2 enable
When we revert, the algorithm creates a configuration with the old sites (1
site) and compare the features.
When we save to the platform, we save the configured sites from the
currentConfiguration. We do not remove the invalid siteEntries

In this situation, we do not disable, or unconfigure the site where Alph2 is

the algorithm should disable all the sites of the platform configuration
(platform.cfg), and then saving the one from the current configuration 

We also have to make sure we do not throw an exception if we cannot find the
site we are saving in platform.cfg. Right now we do.
Comment 2 Christophe Elek CLA 2002-05-23 10:39:23 EDT
We should
1) check for the site we are about to write
2) disable all the site entries
3) write the site that we should write

Also see 17266 if we do not find a site entry
Comment 3 Christophe Elek CLA 2002-05-25 12:59:00 EDT
InstallConfiguration#save(boolean)

Added method InstallConfiguration#private void
unconfigureSites(ConfiguredSiteModel[],IPlatformConfiguration) that logs if we
are about to write a site that doesn't exists in PLatform.cfg, andthen
unconfigure all sites in platform.cfg.

The method savePluginPath nowe creates the Site without checking if it exists
(because they are all unconfigured at this point)

Verified with Redot
I installed Redot1 in C:\TEMP\ and then reverted configuration.
C:\TEMP\ does not appear as a site in platform.cfg
I reverted again and C:\TEMP\ appears in platform.cfg

Version under 20020525_16696
Comment 4 Christophe Elek CLA 2002-05-29 07:58:57 EDT
Verified 0528
Comment 5 Christophe Elek CLA 2002-05-29 08:07:34 EDT
Closing