faq icon


It may not appear sensible or even possible to do this, but it can be done, providing the install tree (listed on the package Web page) is different between the two versions. In general, we tend to install successive versions of binaries into the same tree for convenience and, if this is the case in the binary package you're looking at, then installing two versions isn't possible (one will overwrite the other of course). In that case, you have to swremove the original package before swinstalling the new version.

However, on occasions we've found that there's been compatibility problems, particularly for library-only packages, between releases and we duly adjust the install tree for each incompatible release. The classic example of this problem are the tcl and tk packages, which are notorious for never being compatible with older releases, even when only the minor release number increases.

Using tcl and tk as an example (though this is no longer true for the new combined tcltk package, it did used to apply to the separate tcl and tk packages), we've installed into /usr/local/tcl-X.Y and /usr/local/tk-X.Y trees for each release of version X.Y.Z of the packages. This means you can install multiple versions of tcl for example like this (using versions 8.1.1 and 8.2.1 as an example):

 # First we do tcl 8.1.1 - it's not going to clash with anything
 swinstall -s /tmp/tcl-8.1.1-hppa-11.00.depot tcl
 # Now we do tcl 8.2.1 - it needs an extra option to avoid clashing
 swinstall -x allow_multiple_versions=true -s /tmp/tcl-8.2.1-hppa-11.00.depot tcl
This installs tcl 8.1.1 into /usr/local/tcl-8.1 and tcl 8.2.1 into /usr/local/tcl-8.2. When you come to remove one of the tcl releases (e.g. 8.1.1), you'll need to specify the version number when running swremove:
swremove tcl,r=8.1.1
Note that unless the oldest version of the multiple package versions is a versioned dependency of another package, it will be deleted from our archive after two months. This can actually mean that we can have three or more versions of a dependency package on the archive, if other packages have locked them in via versioned dependencies.