DSN Radio Astronomy
Software Package Selection

Last revised on 1997 Dec 17.
Please send comments toTom Kuiper.


In the root of a package's file system is a file pkg_admin.lst which names all the files for which links need to be made. The following summarizes what the pkg_select script does.

cd /usr/local/pkg/package
pkg_admin remove
cd ..
rm package
ln -s package-V.R package
cd package
pkg_admin install
pkg_specials
This will
  1. remove all the links to the old package (using the old package's pkg_admin.lst,
  2. set the link from the generic package to the new specific package, and
  3. re-build all the file links (using the new package's pkg_admin.lst). Finally,
  4. the script pkg_specials, which resides in the package's base directory, contains any special things that need to be done that weren't by pkg_admin.

The script pkg_select also checks a file called pkg_depends.lst to see if the selected package is dependent on any other packages and, if so, will run the above sequence for them too. pkg_select is smart enough not to select already selected packages.

Finally, pkg_select checks whether the newly selected package in incompatible with any other already selected packages. If so, those packages are de-selected. This is to ensure that another, unrelated package will not try to use incompatible versions of the files on which it depends.

pkg_select Example

Here's a selection of a package with some dependencies:

$ pkg_select tclX-7.4
symbolic link /usr/local/pkg/tclX created
In /radsk/usr/local/pkg/tclX-7.4, about to do 'pkg_admin install'
package /usr/local/pkg/tclX installed; checking dependencies...
Package tcl-7.4 is already selected
symbolic link /usr/local/pkg/tk created
In /radsk/usr/local/pkg/tk-4.0, about to do 'pkg_admin install'
package /usr/local/pkg/tk installed; checking dependencies...
Package tcl-7.4 is already selected
$ pkg_status
pgplot -> /usr/local/pkg/pgplot-5.1.1
tcl -> /usr/local/pkg/tcl-7.4
tclX -> /usr/local/pkg/tclX-7.4
tk -> /usr/local/pkg/tk-4.0
Note the command pkg_status which was not mentioned before. There are ten pkg commands for using and administering packages. Most are for use by developers. An operator will not normallyuse any of them. An investigator might use only the two shown here.

Now here's what happens when a lower level package is changed:

$ pkg_select tcl-7.6
package /usr/local/pkg/tcl removed
symbolic link /usr/local/pkg/tcl removed
symbolic link /usr/local/pkg/tcl created
In /radsk/usr/local/pkg/tcl-7.6, about to do 'pkg_admin install'
package /usr/local/pkg/tcl installed; checking dependencies...
tcl-7.6 is not compatible with tclX-7.4
package /usr/local/pkg/tclX-7.4 removed
symbolic link /usr/local/pkg/tclX removed
tclX-7.4 was de-selected
tcl-7.6 is not compatible with tk-4.0
package /usr/local/pkg/tk-4.0 removed
symbolic link /usr/local/pkg/tk removed
tk-4.0 was de-selected
$ pkg_status
pgplot -> /usr/local/pkg/pgplot-5.1.1
tcl -> /usr/local/pkg/tcl-7.6