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.
As part of the Forte productization of Netbeans, we will be installing a handfull of scripts in the <ide>/bin directory and some localized message catalogs in the <ide>/lib directory. Like runide.sh, these scripts must be installed in the IDE root directory and never in the user directory. I tried creating a test NBM file that installs a single file into netbeans/bin, but I don't see the expected update behavior as described above i.e., the file gets installed in the user directory, not the IDE directory. Is there something else I need to do to designate this NBM as an "IDE-root-only" module? I verified that I do have write access to the IDE directory and the Global checkbox is checked in the last panel of the updater wizard.
Created attachment 5065 [details] Sample NBM file testcase
Strange I cannot reproduce it - I tried Win2K and Solaris and it works fine - scripts correctly in IDE home dir. If you can reproduce it easy, I'll attach patch which should write some debug info into std out, e.g: "File: foo.nbm" if ( success ) "successfully moved to: <IDE dir>" else { "Not able to move to: <IDE dir>" " from: <download path" Could you please send me this output? Thanks.
Created attachment 5071 [details] Testing jar file
I don't see any output generated by this patch. Where exactly is it supposed to be applied?
I was able to finally apply the patch. Here is the output: File:foo.nbm Not able to move to:/set/tw/dev/orion/dist/sparc-S2/update/download from:/home/dey/ffjuser40ee_ea/update/download/foo.nbm It appears that even though the NBM is marked 'global', the updater still copies it to the user directory and then attempts to move it to the IDE directory. I verified that I do have write access to the target directory. I also think I know what the problem is: the /set and /home directories are on different physical disk volumes. If I specify a userdir that is on the same volume as the IDE installation, the update is performed successfully in the IDE directory tree. Apparently the updater is attempting renameTo() instead of a file copy & delete. There are two issues that fall out of this bug report: 1. Global NBMs should install properly when IDE and USERDIR are on different disk volumes THIS FIX IS REQUIRED for NB 3.2.2 2. The updater should give some kind of feedback (error message, warning, etc.) if a global module cannot be installed in the IDE for some reason. Let me know if you'd like me to file a separate issue for #2.
Thanks for your feedback Mark! I didn't use this scenario :-( I'll attach new patch, which should do copy & delete. Could you please confirm it works? If yes, I'll commit it into orion_fcs. I filed #21874 for second issue.
Created attachment 5183 [details] autoupdate_patch.jar
Yes, the second patch works just fine. Thanks!
Fixed in trunk. Waiting for approval to commit into orion_fcs
Diff for review: http://www.netbeans.org/source/browse/autoupdate/src/org/netbeans/modules/autoupdate/Downloader.java.diff?r1=1.24&r2=1.25
Integrated in orion_fcs
Resolved for 3.3.x or earlier, no new info since then -> closing.