Skip to content
kasemir edited this page Sep 22, 2010 · 13 revisions

= Update Repository =

PageOutline

Ideally, CSS end users can update their version of CSS seamlessly to the latest version, install desired features or uninstall functionality that they no longer want.

== Online Updates == CSS versions with online update support have a menu entry {{{Help, Check for Updates}}} that contacts a pre-configured update site, then either displays available updates or states that there is nothing to update.

For example, users who downloaded epics_css_1.9.9-*.zip from http://ics-web.sns.ornl.gov/css/updates/apps/ should see that a version 2.0.0 or later is available, and after selecting the version, maybe acknowldege "unsigned" content and agreeing on a restart, CSS updates itself to that version.

The menu item {{{Help, About...}}} offers a button {{{Installation Details}}} which leads to a dialog that lists the installation history, and allows to revert to a previous version:

Image(config.png)

In addition, {{{Help, Install New Software...}}} allows the manual installation of optional features.

== Technical Details == Online updates are based on Eclipse "P2", see

== Issues == While the overall "update" can be accomplished in a way that is convenient to the end user, there are still some problems.

=== Versions === A Product must be based on Features, which in turn list Plugins. The version numbers of the product, features and plugins must change when their content is modified for P2 to recognize the change. The use of "1.1.2.qualifier" is suggested to assert that new builds will create individual versions based on the build date.

=== Caching, Updates not visible? === In one case it was necessary to delete the {{{ .eclipse }}} directory in the home directory to make online updates take effect.

This was for a shared installation, and seems to be related to the fact that Eclipse uses several "Locations" as visible in the menu {{{Help, About..., Installation Details, Configuration}}}.

This setting points to a directory with P2 information about installed plugins: {{{ [email protected]/../p2 }}}

The configuration area defaults to a location inside the CSS installation: {{{ osgi.configuration.area=......./CSS/configuration }}}

When the "owner" of CSS performs the online updates and then runs CSS, all is fine. When another user runs CSS, a user who does and should not have write permission to the install location, Eclipse sets the configuration area to a ".eclipse" directory in the user's home directory, and uses the original configuration area as a shared, read-only location: {{{ osgi.configuration.area=/usr/fred/.eclipse/2083432532/configuration osgi.sharedConfiguration.area=......./CSS/configuration }}}

In one scenario, that ".eclipse" directory somehow caused CSS to ignore the latest online updates. Removing the ".eclipse" directory, then restarting CSS, fixed the problem.

=== Site-Specific Repositories === Each CSS "Product" and each "Feature" has its default update repository built-in. Since different sites use different products, and probably also need to control what updates (features, their versions) are suitable for their users, at least for the complete product update, the update repositories need to be site-specific.

=== Headless Build Issues === The only practical way to create products is a "headless build", but in a headless build the launchers for Linux and OS X are for the time being not marked as executable (https://bugs.eclipse.org/bugs/show_bug.cgi?id=282260).

=== Whole-product update === We currently create products that list all the desired features in their *.product file. That way, the features are an integral part of the product and they cannot be updated without updating the whole product.

When for example the Data Browser feature changes, it would be nice to only export this latest feature to the repository so that users can fetch an update. This, however, does currently not work since the product already included the Data Browser. There will be an error message "Only one of the following can be installed at once", declaring a conflict between the Data Browser plugin that's part of the product and the one from the intended update.

So we have to

  • Update the version number of the product
  • Export the whole product to the update repository

The problem is also described here: http://aniefer.blogspot.com/2009/07/composing-and-updating-custom-eclipse.html

A more general solution is this:

  1. Headless build of the very basic product
  2. Headless build of all the possible features
  3. Use P2 command-line tools to install desired features into the product
  4. ZIP the result for users to download

Since the features would then be just like features that the user has installed via P2, they're no longer required components of the product, each feature can be updated separately via P2. Instead of performing these steps in a script, they can also be performed as part of the headless build via customAssembly.xml, see aniefer blog post.

=== Use of dropins, direct plugin manipulations === While it can be convenient when "only updating one plugin", one should not use dropins or direct plugin folder manipulations, because that circumvents P2.

SNS CSS from version 2.3.0 on has limited support for dropins, meaning

  1. There is a folder {{{dropins}}} in the product
  2. The product contains the plugin {{{org.eclipse.equinox.p2.reconciler.dropins}}}
  3. The file {{{configuration/org.eclipse.equinox.simpleconfigurator/bundles.info}}} configures the reconciler.dropins plugin to be started (line ends in {{{true}}})

When dropins are enabled, arbitrary plugins copied into the dropins directory will be included in the product on the next restart.

Without dropins, when manually adding plugins to the {{{plugins}}} folder, edit {{{configuration/config.ini}}} to include: {{{

Allow manual addition to the "plugins/" folder

These will be ignored after the next full online update!

org.eclipse.update.reconcile=true }}}

However, for both manually added plugins or the dropins folder the whole-product update restrictions still apply: You cannot put a new Data Browser plugin into the dropins directory when the product configuration already contains a Data Browser version.

=== Imperfect Dependencies === Correctly configuring all dependencies takes a lot of time.

{{{Help, Install New Software...}}} might allow users to install features which are really incompatible to their current setup.

For example, it will allow users of the SNS "Office" product to add the core CSS components for the SNS "Basic" product without warnings, resulting in a product that really contains two products, which then refuses to run.

Clone this wiki locally