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 21607 - Unable to force an NBM to install in {netbeans.home}
Summary: Unable to force an NBM to install in {netbeans.home}
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: -FFJ-
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: akemr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-14 21:04 UTC by Mark Dey
Modified: 2003-06-30 13:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample NBM file testcase (5.62 KB, application/octet-stream)
2002-03-14 21:14 UTC, Mark Dey
Details
Testing jar file (9.62 KB, application/octet-stream)
2002-03-15 12:41 UTC, akemr
Details
autoupdate_patch.jar (9.71 KB, application/octet-stream)
2002-03-26 10:29 UTC, akemr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dey 2002-03-14 21:04:20 UTC
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.
Comment 1 Mark Dey 2002-03-14 21:14:54 UTC
Created attachment 5065 [details]
Sample NBM file testcase
Comment 2 akemr 2002-03-15 10:35:01 UTC
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.
Comment 3 akemr 2002-03-15 12:41:45 UTC
Created attachment 5071 [details]
Testing jar file
Comment 4 Mark Dey 2002-03-21 21:56:35 UTC
I don't see any output generated by this patch. Where exactly is it
supposed to be applied?
Comment 5 Mark Dey 2002-03-25 16:51:09 UTC
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.
Comment 6 akemr 2002-03-26 10:29:03 UTC
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.
Comment 7 akemr 2002-03-26 10:29:43 UTC
Created attachment 5183 [details]
autoupdate_patch.jar
Comment 8 Mark Dey 2002-03-26 16:57:10 UTC
Yes, the second patch works just fine.

Thanks!
Comment 9 akemr 2002-03-27 07:12:56 UTC
Fixed in trunk.

Waiting for approval to commit into orion_fcs
Comment 11 akemr 2002-03-27 13:39:05 UTC
Integrated in orion_fcs
Comment 12 Quality Engineering 2003-06-30 13:47:19 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 13 Quality Engineering 2003-06-30 13:51:36 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.