Summary of Vesta Commands

This document summarizes the most common Vesta commands.



In the following examples:

Creating a new package-parent directory using mkdir(1) and vattrib(1)

  1. cd /vesta/site
  2. mkdir pp
  3. vattrib -s type package-parent pp

Creating a new package using vcreate(1)

  1. vcreate pp/pkg

Checking out a package using vcheckout(1)

  1. vcheckout pp/pkg
  2. cd /vesta-work/username/pkg

The first step creates the directory named pkg in /vesta-work/username. You can then cd into that directory to do builds from it.

Checking in a package using vcheckin(1)

  1. cd /vesta-work/username/pkg
  2. vcheckin
  3. cd

The second step deletes your current directory /vesta-work/username/pkg, so afterwards you will usually want to cd into some other directory, as shown in the third step.

Creating a package branch using vbranch(1)

The most common case is to create a branch off the main line of a package. For example, let NN denote a package version number. To create a branch named NN.bugfix off of the main package version pp/pkg/NN, do:

  1. vbranch pp/pkg/NN.bugfix

For example, the following command creates a branch off of the vesta/eval package:

  $ vbranch vesta/eval/47.bugfix
  Creating branch /vesta/

The new directory /vesta/ is like its own package: it has its own version numbers and its own checkout sub-directory. See the vbranch(1) man page for details.

Checking out a package branch using vcheckout(1)

Checking out a branch is essentially the same as checking out a regular package. Let branch be the name of a main-line package branch in the package pp/pkg. The following commands check out the package, using the name pkg for the local working directory.

  1. vcheckout pp/pkg/branch
  2. cd /vesta-work/username/pkg

If there is already a working directory named pkg, an alternative new name like pkg.1 is automatically synthesized.

Continuing the branch example from above, the following commands would checkout out the new branch:

  $ cd /vesta-work/heydon
  $ vbranch vesta/eval/47.bugfix
  Reserving version /vesta/
  Creating session /vesta/
  Making working directory /vesta-work/heydon/eval
  $ cd eval

Checking in a branch using vcheckin(1)

Checking in a package branch works identically to checking in a regular package version.

  1. cd /vesta-work/username/pkg
  2. vcheckin

Continuing the branch example from above, here is the output produced by checking in the branch:

  $ cd /vesta-work/heydon/eval
  $ vcheckin
  Checking in /vesta/
  Deleting /vesta-work/heydon/eval
  $ cd

Advancing and building a package using vmake(1)

  1. cd /vesta-work/username/pkg
  2. vmake
The vmake(1) command deletes the backup files in the package, advances it using vadvance(1), and invokes the vesta evaluator vesta(1) on it. vadvance(1) creates a copy of the working version in the checkout directory /vesta/site/pp/pkg/checkout/maj/min, where maj is the major package version you are working on, and min is the new sub-version number.

Updating a package's imports using vupdate(1)

  1. cd /vesta-work/username/pkg
  2. vupdate

By default, vupdate(1) updates the imports of the package's .main.ves model only. To update other models within the package, use the -r switch. To see what vupdate would do without making any changes, use the -n switch.

Listing a package's imports using vimports(1)

The vimports(1) program lists the models imported directly or indirectly by a model. It can be used both on checked in and checked out packages. To see the transitive closure of the imports of a checked-out package, do:

  1. cd /vesta-work/username/pkg
  2. vimports .main.ves

The output produced by vimports can be quite verbose. The program includes several options for eliding parts of its output. The -depth option elides all imports below a certain depth. The -show option can then be used to selectively show the imports below some package. See the man page for details.

Shipping package derived files using vmake(1)

To use access the derived files produced by a package build, you have to instruct the evaluator to copy (parts of) the build's result binding into your normal file system. This is done using the evaluator's -shipfrom and -shipto arguments.

  1. cd /vesta-work/username/pkg
  2. vmake -shipfrom src -shipto dest

Here, src is the (sub-)binding within the package result to be shipped, and dest is the destination directory in the normal file system to which the result should be copied. To create symbolic links rather than full copies, use the -s switch. Warning: the referents of such symbolic links may be deleted by the weeder, so the -s switch should be used only to ship test versions of deriveds for temporary use.

For example, the result value produced by building the examples/hello_c package is a singleton binding containing the name progs. Here's the result value as printed by the evaluator:

  Return value of `.main.ves':
    [ progs=[ hello= ] ]

To ship the hello executable to the directory ~/bin, you would run:

  vmake -shipfrom progs -shipto ~/bin

To create a symbolic link rather than a full copy, use the -s switch:

  vmake -s -shipfrom progs -shipto ~/bin


Allan Heydon (

Last modified: Mon Oct 13 11:31:19 EDT 2003