About News Download Docs Bugs Contact





Cast command

In Source Mage, "casting spells" means installing programs. The Grimoire contains the list of spells one can cast.

cast casts a program by:

# cast <spell>

Multiple spells can be cast like so:

# cast <spell 1> <spell 2> <spell 3> ... <spell N>

cast does rather more than simply install a program. The process can be broken down into four main steps:

  1. Prepare:
    cast prepares all the options before the compile and downloading begins. This way, user input is only needed at one stage and the system can be left alone. Spells should rarely ever need human input past this step. This step also houses dependency resolution.
  2. Download:
    depending on the settings, cast uses "wget" or "aria2" to download the source code of the program from its web site.
  3. Compile:
    by following the instructions defined in the spell and the configuration before the download step, the spell is compiled accordingly.
  4. Install:
    the spell also contains instructions about where to put the compiled files once the compilation phase is over. Logs documenting the installed files are kept in /var/log/sorcery/install by default. Dispel needs this file to know what to delete.

Dependencies come in four different flavors. There are required, runtime, optional, and suggested dependencies:

A step not outlined above is the post-install step. Sometimes messages will be printed here or the need to install an example configuration file arises.

Sometimes during the prepare step, there is a message that says:

<spell 1> triggers a cast_self on <spell 2>

This happens when a spell may use static linking of another spell, and cannot use features until it is recompiled.

Sometimes a check_self will trigger. This may arise to a spell misbehaving or causing other problems to another spell. This check_self will fix the spell if there is a break.

For a more detailed view on cast see the cast components page. For options and more information see cast(8) manual page.