/package/admin/daemontools -> daemontools-0.80 /package/admin/daemontools-0.76 /package/admin/daemontools-0.80 /package/admin/daemontools-0.92This system has versions 0.76, 0.80, and 0.92 of the admin/daemontools package. The current version, as specified by the admin/daemontools symbolic link, is 0.80. Presumably 0.76 is an older version and 0.92 is an experimental new version.
Normally other packages and users will access the current version through /package/admin/daemontools. For example, /command/tai64nlocal is a symbolic link to /package/admin/daemontools/command/tai64nlocal, so a user who types tai64nlocal will run the current version of tai64nlocal.
A normal part of installing a new package is upgrading the system to use that package. Upgrading from version 0.80 to version 0.92, for example, means (atomically) changing the /package/admin/daemontools symbolic link to point to daemontools-0.92, and making sure that there are links in /command for all the daemontools-0.92 commands. This is all handled by the /package/admin/daemontools/package/upgrade script.
Occasionally users will want to access versions of a package other than the current one. A user who types /package/admin/daemontools-0.92/command/tai64nlocal, for example, will run version 0.92 of tai64nlocal. If you're building a package, you should design the package to work as well as possible before the system has been upgraded to that version, and after the system has been upgraded to a subsequent version. The system administrator can compile, test, and use /package/admin/daemontools-0.92, for example, without linking daemontools to daemontools-0.92.
If you're building a package, you can include a file ./package/versions that lists all the version numbers you've used so far, one per line, in order. Then scripts can compare two versions to see which one is newer. For example, if /package/admin/daemontools-0.80/package/versions says
0.75 0.76 0.80while /package/admin/dameontools-0.92/package/versions says
0.75 0.76 0.80 0.81 0.90 0.91 0.92then 0.92 is newer. This file also makes it possible to reliably handle dependencies such as ``you must have version 0.81 or newer.''