This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198359

Summary: removed UC can not be added (re-added) by installing a module
Product: platform Reporter: err <err>
Component: Plugin ManagerAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: normal CC: jrechtacek
Priority: P4    
Version: 7.0   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 179047    

Description err 2011-05-05 18:44:08 UTC
Given a module that is only a layer.xml with a UC.

1) install the module, the UC appears as expected
2) un-install the module
3) remove the UC
4) re-install the module
Observe: the UC is not there

The 7.0/config/Preferences/org/netbeans/modules/autoupdate/xxx_removed property prevents the xxx update center from being seen. This situation arises when the xxx_removed preference key exists true and there is no module that installs the xxx update center.

It seems the xxx_removed property should be cleared if the module that defined the update center is un-installed. In addition, if the UC is removed, and module that installed it has already been un-installed, then the xxx_removed property does not need to be set/created.

There's UpdateUnitProviderFactory.getDefault().create(...), but I'm assuming using that in a module installer would not override the xxx_removed flag.

I notice that when a manually added update center is removed then the _removed property is created; this is unnecessary litter in the preferences name space. (I don't know if this prevents manually adding an update center with the same name)

I guess I can add a post-install, as described in http://wiki.netbeans.org/DevFaqNbmPostInstall, to the module that removes the xxx_removed property.  Of course modifying some random preference, xxx_removed, that belongs to autoupdate violates any number of conventions; is there an API to clear the flag?
Comment 1 Jaroslav Tulach 2011-05-07 14:58:50 UTC
If you uninstall a module, the update center should disappear, e.g. no way to do step #3. If this does not work, then it is the source of other problems.