Bug 16421 - Reconciliation is processing non-existent features
Summary: Reconciliation is processing non-existent features
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 M6   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-20 09:16 EDT by Vlad Klicnik CLA
Modified: 2002-05-20 10:11 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Klicnik CLA 2002-05-20 09:16:04 EDT
20020519 Win32

I have created a dummy subdirectory in the features/ directory that contained 
no feature.xml. At the same time I "touched" (made a dummy edit and saved) a 
real feature.xml in another feature subdirectory (to trigger change detection).

On startup, reconciler processed the dummy subdirectory as a change (even 
though it has no feature.xml) and produces a delta. This triggered the "you've 
got changes" dialog showing <path>/features/<dummy dir>/(0.0.0) as the change.

If a feature directory does not contain feature.xml IT IS NOT A FEATURE and 
should simply be ignored. Consider the case where we fail part way through the 
install. We must not flag the partial install (with feature999999.xml) as 
changes or errors on next startup.
Comment 1 Vlad Klicnik CLA 2002-05-20 09:28:08 EDT
When the plugin registry is loaded, the code makes a check for plugin.xml/ 
feature.xml as follows:

InputStream is = null;
try {
	is = manifest.openStream();
} catch (IOException e) {
	if (debug)
		debug("No plugin found for: " + manifest);
	return null;
}
// parse the xml file by passing it the stream
// close the stream

We need to do something similar .... ie. need to distinguish missing xml file 
from inability to parse.
Comment 2 Christophe Elek CLA 2002-05-20 10:11:30 EDT
Changed code in SiteFileParser to check for existence of feature.xml in 
directory.
Checked scenario, the workspace opens but doesn't prompt the user fora new 
feature. The delat XML file is not created. The log shows the warning:
!MESSAGE Install/Update WARNING:Unable to find feature.xml in directory:C:\SDK 
0515\eclipse\features\org.eclipse.jdt_2.0.1