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 182758 - Cannot remove Update Center
Summary: Cannot remove Update Center
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: dlipin
URL:
Keywords:
Depends on:
Blocks: 172891
  Show dependency tree
 
Reported: 2010-03-25 11:02 UTC by Tomas Mysik
Modified: 2010-04-02 04:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2010-03-25 11:02:47 UTC
Steps to reproduce:
- open Tools > Plugins > Settings
- select an update center
- Remove

-> nothing happens

Product Version: NetBeans IDE Dev (Build 100325-afc95ecdb359)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
System: Linux version 2.6.31-20-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 dlipin 2010-03-26 09:41:27 UTC
Looks like a regression after
http://hg.netbeans.org/core-main/rev/d2757d4ba57a
Comment 2 Jesse Glick 2010-03-26 14:36:57 UTC
Maybe. It wasn't clear what exactly refresh was for, just that as written it was wrong.
Comment 3 dlipin 2010-03-30 16:20:06 UTC
Update: the following change likely caused this regression:
http://hg.netbeans.org/core-main/rev/ae3bdf2f47a2

Before that sKey ("URL_Default_N") was passed to AutoupdateCatalogProvider constructor; after it - provider.getName() ("dev-update-provider").

So when UC is removed ...
BEFORE: <s_key>_removed.properties was created (URL_Default_N_removed.properties)
AFTER: <name>_removed.properties was created (dev-update-provider_removed.properties)

Actually ae3bdf2f47a2 and d2757d4ba57a are not exactly the reason of regresson, but they showed that url_key (URL_Default_N) and FS name (dev-update-provider) are usage is wrong in some place (likely when dealing with *_removed marker or checking for .nodeExist()).

Looking into that now...
Comment 4 dlipin 2010-03-30 20:06:25 UTC
As a proof of this issue as "a long history" one I have checked that having .instance name the same as the url_key prevent UC from being deleted from Plugin Manager in both 6.8 and 6.5. 

In other words:
#part of the layer.xml
<filesystem>
  <folder name="Services">
    <folder name="AutoupdateType">      
      <file name="MyUC.instance">
        <attr name="url_key" stringvalue="MyUC"/>
         .....
      </file>
    </folder>
  </folder>
</folder>

#Bundle.properties
Services/AutoupdateType/MyUC.instance=My Update Center
MyUC=http://www.com
Comment 5 dlipin 2010-03-30 21:10:45 UTC
Fixed in core-main #2b3d3a21555f, please verify.
Comment 6 Tomas Mysik 2010-03-31 12:30:58 UTC
Verified, thanks.

Product Version: NetBeans IDE Dev (Build 100331-6c62b4c5632b)
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
System: Linux version 2.6.31-20-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 7 Quality Engineering 2010-04-02 04:53:45 UTC
Integrated into 'main-golden', will be available in build *201004020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2b3d3a21555f
User: Dmitry Lipin <dlipin@netbeans.org>
Log: Issue #182758 Cannot remove Update Center