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 128718 - PM installs IDE modules in userdir
Summary: PM installs IDE modules in userdir
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Plugin Manager (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 129184 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-28 16:24 UTC by Jesse Glick
Modified: 2008-03-18 16:46 UTC (History)
0 users

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 Jesse Glick 2008-02-28 16:24:27 UTC
I thought this was fixed for 6.0, but maybe not? When there are updates available for modules which I have in my NB
installation, AU dumps them in my user directory, rather than upgrading the module in the installation. This can cause
serious problems such as issue #128590 - a bug in java.source + java.sourceui (version skew) but one which would
otherwise have been corrected by doing a fresh build from sources. Instead I was left with an obsolete copy of
java.sourceui in my userdir without my knowledge.
Comment 1 Jiri Rechtacek 2008-02-29 11:56:49 UTC
Each update should replace the original location (if write permission allows, of course). If it was broken it would be a
regression in NB6.1. I'll try to reproduce the problem, i.e. update java.sourceui module and watch the target directory
but I think it should work correctly. Jesse, can you reproduce the problem with verbose logging of
org.netbeans.modules.autoupdate.services.InstallManager.level=-1 and send me back your output? Thanks
Comment 2 Jiri Rechtacek 2008-02-29 13:40:39 UTC
Worksforme. My output from verbose InstallManager:
FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: Install dir of Java Source
UI[org.netbeans.modules.java.sourceui/1.5.0.1.2] is /space/source/hg/work/main/nbbuild/netbeans/java2
FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: UpdateElement Java Source
UI[org.netbeans.modules.java.sourceui/1.5.0.1.4] has the target cluster /space/source/hg/work/main/nbbuild/netbeans/java2
on build Dev 080226.
Reopen it if you have more details about the problem. Thanks
Comment 3 Jesse Glick 2008-02-29 20:53:15 UTC
Cannot reproduce on demand either. I just know that I had a month-old copy of java.sourceui dumped in my userdir after
some update. I will leave your logging flag on and see if it happens again.
Comment 4 Jesse Glick 2008-03-03 21:17:51 UTC
Just happened to me again. I was offered to update java.source and api.debugger. I accepted both. One but not the other
got put into userdir:

FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: Install dir of Debugger Core
API[org.netbeans.api.debugger/1.12] is /space/nb/curr/ide9
FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: UpdateElement Debugger Core
API[org.netbeans.api.debugger/1.13] has the target cluster /space/nb/curr/ide9
FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: Install dir of Java
Source[org.netbeans.modules.java.source/0.31.0.3.6] is /home/jglick/nbdev
FINEST [org.netbeans.modules.autoupdate.services.InstallManager]: UpdateElement Java
Source[org.netbeans.modules.java.source/0.32.0.3.6] has the target cluster /home/jglick/nbdev

After manually java.source from userdir and restarting, it was offered by PM again, as expected. I again accepted the
update. It was again put into the userdir.
Comment 5 Jesse Glick 2008-03-03 21:33:47 UTC
Inspection of InstallManager.getInstallDir shows why it is wrong. You cannot use config/Modules/$cnb.xml to locate a
module's installation, because any time a module is turned on or off etc. this entry in the userdir is modified.

You should instead look for update_tracking/$cnb.xml, which in addition would be easier because you do not need to
special-case fixed modules like boot.jar - they should have update_tracking entries like any other modules.

This appears to be broken in 6.0 as well, which I would consider a defect serious enough to be worth patching.
Comment 6 Jiri Rechtacek 2008-03-04 15:19:15 UTC
Thanks for hint. I'll fix it in NB6.1
Comment 7 Jiri Rechtacek 2008-03-05 11:15:52 UTC
changeset #eebccb258962
Comment 8 Lukas Hasik 2008-03-18 16:46:08 UTC
*** Issue 129184 has been marked as a duplicate of this issue. ***