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.
There's a need for simple log of global changes made by AutoUpdate. The primary motivation behind this requirement is to make the uninstaller aware of post-install changes to the installation structure and have it to uninstall the product completely including the updates installed via AU. Note: I originally thought there already was such a log file (update-tracking.xml or something like that), but I couldn't find it. There doesn't seem to be a single file listing all changes made to the the default installation. Obviously, a similar log could be created in userdir to track local updates. Ideally, the same log file could be used by the AutoUpdate module for uninstalling previous updates (see issue #20323 and issue #49619). The file format should be designed with this requirement in mind, although #20323 and #49619 won't be implemented in 4.1.
Thanks for filing this. We need to discuss: 1. name of this file 2. its location 3. the format / content of the file For #1, the name is fixed I supposed and it doesn't matter what to us. For #2, it is important that you place it somewhere under $installDir that we can find it For #3, we need this file: . To contain a cummulative list of all the autoupdated files (no duplication) . To have absolute path of the files or at least starting from ${installDir} Comments?
Luckily, Autoupdate module already contains support for logging, it logs all changes made by Autoupdate client, it's UpdateTracking. It hasn't been used yet but it works. What does? Logs all updates in own XML files. A XML file contains: - name of updated module, its spec. version - list of added/modified files and install time - each update makes a addition into corresponding XML file. Each module has own log file and it's placed in the cluster where has been installed. For example: If I install apisupport module (which is not a part of standard distribution) and later I update this module to higher version, then the log file looks like: <?xml version="1.0" encoding="UTF-8"?> <module codename="org.netbeans.modules.apisupport"> <module_version install_time="1110983893769" last="false" origin="updater" specification_version="2.38"> <file crc="3794779867" name="config/Modules/org-netbeans-modules-apisupport.xml"/> <file crc="1520961072" name="modules/docs/org-netbeans-modules-apisupport.jar"/> <file crc="3144149026" name="modules/org-netbeans-modules-apisupport.jar"/> <file crc="3116863894" name="nb-prof-debug/optimizeit/README.txt"/> <file crc="3214230368" name="nb-prof-debug/optimizeit/nbcvr.bat"/> <file crc="1851484419" name="nb-prof-debug/optimizeit/nbcvr.sh"/> <file crc="3422462025" name="nb-prof-debug/optimizeit/nbopt.bat"/> <file crc="2923112710" name="nb-prof-debug/optimizeit/nbopt.sh"/> <file crc="164566795" name="nb-prof-debug/optimizeit/nbthr.bat"/> <file crc="887044384" name="nb-prof-debug/optimizeit/nbthr.sh"/> <file crc="728863865" name="nb-prof-debug/runide_g.bat"/> <file crc="98691281" name="nb-prof-debug/runide_g.sh"/> <file crc="715337918" name="nb-prof-debug/time-delta.pl"/> </module_version> <module_version install_time="1110984937598" last="true" origin="updater" specification_version="2.39"> <file crc="3794779867" name="config/Modules/org-netbeans-modules-apisupport.xml"/> <file crc="1520961072" name="modules/docs/org-netbeans-modules-apisupport.jar"/> <file crc="3144149026" name="modules/org-netbeans-modules-apisupport.jar"/> <file crc="3116863894" name="nb-prof-debug/optimizeit/README.txt"/> <file crc="3214230368" name="nb-prof-debug/optimizeit/nbcvr.bat"/> <file crc="1851484419" name="nb-prof-debug/optimizeit/nbcvr.sh"/> <file crc="3422462025" name="nb-prof-debug/optimizeit/nbopt.bat"/> <file crc="2923112710" name="nb-prof-debug/optimizeit/nbopt.sh"/> <file crc="164566795" name="nb-prof-debug/optimizeit/nbthr.bat"/> <file crc="887044384" name="nb-prof-debug/optimizeit/nbthr.sh"/> <file crc="728863865" name="nb-prof-debug/runide_g.bat"/> <file crc="98691281" name="nb-prof-debug/runide_g.sh"/> <file crc="715337918" name="nb-prof-debug/time-delta.pl"/> </module_version> </module> update_tracking/org-netbeans-modules-apisupport.xml (END) IMHO it supplies enough information to assemble: A. summary downloaded and installed updates (with its versions) B. list of new/modified files per update The log file is <cluster>/update_tracking/<module_code_name>.xml, in this example $HOME/.netbeans/4.0/update_tracking/org-netbeans-modules-apisupport.xml Its location is under <cluster> where was installed. The paths to files (in the log) starts in <cluster>, i.e. modules/org-netbeans-modules-apisupport.jar Huge benefit is that is already part of Autoupdate functionality and already tested. Is it reasonable for you? Comments? Please, review it. Thanks
This sounds reasonable to us for now. Thanks.
I have a question on this issue. How is the "origin" attribute generated? We want this to be different between modules installed by the installer and modules modified by Autoupdate.
The 'origin' attribute is generated by some task on nbbuild/build.xml. Autoupdate client writes 'updater' in this attribute. Is it enough for discriminate these tow possibilities?
I asked this question because the autoupdated components from our previous releases based on NB3.6 used "installer" as the origin attribute value. Is this something that we have to configure in our build scripts?
It was a bug. Fixed by Jirka just recently. See http://www.netbeans.org/source/browse/autoupdate/libsrc/org/netbeans/updater/UpdateTracking.java?r1=1.17&r2=1.18
It's approachable in NB4.1.