NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1147 (closed defect: fixed)

Opened 2012-04-29T17:13:24-05:00

Last modified 2012-05-29T13:45:42-05:00

Miscellaneous Updater issues

Reported by: dscho Owned by: dscho
Priority: major Milestone: imagej2-b3-headless
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by dscho)

  • the updater *must* update the updater first, if updates for that are available!
  • read metadata (description, authors, etc) from pom.xml when empty
  • override empty metadata from update site
  • fix non-advancing progress bar when uploading (+test)
  • focus on password in password dialog
  • when the scrollbar is at the bottom in the detailed progress, keep it there

Change History

comment:1 Changed 2012-04-29T17:33:32-05:00 by dscho

  • Description modified

comment:2 Changed 2012-05-05T23:17:27-05:00 by dscho

Update on the Updater issues ;-)

The Update-the-Updater-first functionality has been reinstated. It had been working correctly, if it was not for the change before beta2 to support file names with version numbers in them. On a high note, that functionality was now moved into the core.

Funny side note: at some stage, I had to test this interactively, which I did by downloading the complete update site locally, redirecting the local db.xml.gz 's update site URL to the local site, and then running this script every time I changed the source code:

(cd core/updater/core/ && maven) &&
(cd ui/awt-swing/swing/updater/ && maven) &&
cp /path/to/fiji/modules/imagej2/core/updater/core/target/ij-updater-core-2.0.0-SNAPSHOT.jar /path/to/fiji/modules/imagej2/ui/awt-swing/swing/updater/target/ij-ui-swing-updater-2.0.0-SNAPSHOT.jar ImageJ.app/jars/ &&
sha1="$(./ImageJ.app/ImageJ-linux64 ImageJ.app/calculate-checksums.bsh jars/ij-updater-core-2.0.0-SNAPSHOT.jar 2> /dev/null | sed 's/.* //')" &&
gunzip update-site/db.xml.gz &&
sed -i "s/be02a995d8f202946c255fa71f5a14aa57a3e1d9/$sha1/" update-site/db.xml &&
gzip update-site/db.xml &&
./ImageJ.app/ImageJ-linux64

This requires ImageJ.app/calculate-checksums.bsh of course, which I derived from Fiji's version:

/*/. 2>/dev/null; exec "$(dirname "$0")"/ImageJ-linux64 -Dpatch.ij1=false -- "$0" "$@" # exec with ImageJ */

import imagej.updater.core.Checksummer;
import imagej.updater.core.FilesCollection;
import imagej.updater.core.FileObject;

import imagej.updater.util.StderrProgress;

import java.util.Arrays;

dbPath = System.getProperty("ij.dir") + "/db.xml.gz";

plugins = new FilesCollection(new File(System.getProperty("ij.dir")));
progress = new StderrProgress();
checksummer = new Checksummer(plugins, progress);

if (bsh.args.length > 0) {
        checksummer.updateFromLocal(Arrays.asList(bsh.args));
}
else
        checksummer.updateFromLocal();
plugins.sort();
iter = plugins.iterator();
while (iter.hasNext()) {
        FileObject plugin = iter.next();
        print(plugin + " " + plugin.current.checksum);
}

On the issue I described as "override empty metadata from update site": metadata is no longer easily forgotten (when updating files from -beta1 to -beta2, it forgot all the metadata I had put into db.xml.gz in the first upload).

comment:3 Changed 2012-05-06T02:50:48-05:00 by dscho

With the newest changes on the updater branch, metadata is picked up from a pom.xml if one is contained in a .jar.

comment:4 Changed 2012-05-29T13:45:42-05:00 by dscho

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 81fdfc4d68ab2d715e914cbfc9e40397665c4a4c