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 108232 - autoupdate does not work for update of global modules
Summary: autoupdate does not work for update of global modules
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks: 106361
  Show dependency tree
 
Reported: 2007-06-26 23:54 UTC by phamernik
Modified: 2019-05-14 03:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Possible bugfix (1.04 KB, patch)
2007-06-26 23:56 UTC, phamernik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description phamernik 2007-06-26 23:54:11 UTC
We have a module which looks like:
<module codenamebase="com.acme.branding" distribution="" 
downloadsize="0" global="true"  license="397830E2" moduleauthor="" 
needsrestart="true" releasedate="2007/06/26" targetcluster="appname">

If I want to autoupdate it (module is already present there, enabled and loaded), then I am getting an errors that
$installdir/appname/config/Modules/com-acme-branding.xml is not a DIRECTORY.

It seems the bug is in InstallManager code. When it's trying to find out the destination directory, it returns directly
result from InstalledFileLocator to .xml file.

If you apply the attached diff, it seems the module is autoupdated correctly.

We are currently using M9, but going to upgrade to M10 when this will be finalized. Is it possible to integrate this
bugfix into M10? It's very important for us. Thanks.
Comment 1 phamernik 2007-06-26 23:56:13 UTC
Created attachment 44436 [details]
Possible bugfix
Comment 2 Jiri Rechtacek 2007-06-27 08:54:21 UTC
Investigating possible problem...
Comment 3 Jiri Rechtacek 2007-06-27 16:07:54 UTC
Checking in services/src/org/netbeans/modules/autoupdate/services/InstallManager.java;
/shared/data/ccvs/repository/autoupdate/services/src/org/netbeans/modules/autoupdate/services/InstallManager.java,v  <--
 InstallManager.java
new revision: 1.6.2.1; previous revision: 1.6
done
Checking in ui/src/org/netbeans/modules/autoupdate/ui/Utilities.java;
/shared/data/ccvs/repository/autoupdate/ui/src/org/netbeans/modules/autoupdate/ui/Utilities.java,v  <--  Utilities.java
new revision: 1.17.2.1; previous revision: 1.17
done
Comment 4 Peter Pis 2007-06-28 16:48:58 UTC
Could you please verify this issue for the latest M10 build? Thanks.
Comment 5 Svata Dedic 2007-06-29 00:10:29 UTC
I run into the following issue:

java.lang.IllegalArgumentException: Parameter file was not normalized. Was ./../foobar instead of
/space/src/upg10/foobar/foobar
        at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:509)
        at org.netbeans.modules.autoupdate.services.InstallManager.getInstallDir(InstallManager.java:104)
        at org.netbeans.modules.autoupdate.services.InstallManager.findTargetDirectory(InstallManager.java:56)
        at org.netbeans.modules.autoupdate.services.InstallSupportImpl.getTargetCluster(InstallSupportImpl.java:784)
        at org.netbeans.modules.autoupdate.services.InstallSupportImpl.getDestination(InstallSupportImpl.java:566)
        at org.netbeans.modules.autoupdate.services.InstallSupportImpl.getFileForInstall(InstallSupportImpl.java:745)
        at org.netbeans.modules.autoupdate.services.InstallSupportImpl.doCancel(InstallSupportImpl.java:446)
        at org.netbeans.api.autoupdate.InstallSupport.doCancel(InstallSupport.java:60)
[catch] at org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizardModel.doCleanup(InstallUnitWizardModel.java:133)

as I debugged the problem, it's because 
   System.getProperty("netbeans.dirs")
is set to:
   "./../foobar:./../ide8"
on my application's installation. So when the InstallManager.getInstallDir passes relative File object to toFileObject,
it fails. Actually I have no idea why there are relative paths, since the startup console message show absolute paths on
the "Installation = " line.

Suggest to add
      cluster = FileUtil.normalizeFile(cluster) at line 104
Comment 6 Marian Mirilovic 2007-06-29 07:48:01 UTC
Jirka, Radek ... 
please look at this ASAP - it's M10 stopper!

I've tried to reproduce it :
- installed locally downloaded module to shared directory
-> IDE started with this module
- increase version of the same module and tried to update to this version
-> IDE started with new version of module 

BTW: Is the problem reported by Svata the same as reported by Petr ?
Comment 7 rmatous 2007-06-29 08:48:31 UTC
Svata, Petr - although suggested fix seems to be right and is very easy, I have a question - is it for you P1 reason for
delaying  M10?
Comment 8 rmatous 2007-06-29 10:16:07 UTC
I'm not able achieve the state when System.getProperty("netbeans.dirs") return relative path. AFAIK also QA wasn't able
to reproduce. 

I've created new issue #108499 "IllegalArgumentException during update of global modules". Suggested fix will be applied
in frame of it. I also filled issue #108503 "System.getProperty("netbeans.dirs") returns relative path". 

This one I consider to be fixed.

Comment 9 Marian Mirilovic 2007-06-29 10:17:59 UTC
Agreed - verified in M10 candidate.
Comment 10 samwyatt 2019-05-14 03:26:35 UTC
QA was not able to reproduce. 
https://www.geometrydash.me/happy-wheels-unblocked.html