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

Logically enough, you cast a spell by typing in "cast spellname" (no quotes).

Cast does rather more than simply install a program, though. The process can be broken down into three main steps:

1) Download.

2) Compile.

3) Install.

That said, the actual casting of individual spells sometimes becomes more complicated. There are several cases in which this may happen:

Dependencies: One spell may depend on another. Fortunately, cast takes care of dependencies automatically. You will be prompted to cast dependencies, which come in two flavors: required and optional. The dependencies you select will be cast before the main spell, so that everything will work right. You can say "no" to a required dependancy, but it's not recommended for the faint of heart. Say "yes" to required dependencies unless you know what you're doing!

Post-Install setup: Sometimes spells require post-install configuration and testing that can't be taken care of by cast. An example is Free Type2 -- after casting this spell, you will be reminded that you need to specify the font path of your X server manually, and run ttmkfdir in your True Type font directory. Because there is no agreed-upon standard location for True Type fonts in X-windows, cast cannot do these things for you. It doesn't know where you've decided to install your fonts.

Supported Spells: Sometimes you will need to recompile a spell that is a dependancy for other programs. After the spell is recast, you may be prompted to recast the spells that depend on it in order to make certain they function with the new version. This is important for programs that are statically linked against common libraries, and particularly necessary when taking care of security vulnerabilities. For example, following the discovery of a severe vulnerability in the commonly used library zlib, a sorcery update recompiled zlib, and then prompted to recompile affected programs, thereby ensuring that the vulnerability was eliminated on that box.

All in all, cast is quite simple to use, like the other Source Mage commands. There are some command-line options you can use with cast, that are discussed in the section CastOptions.

last edited 2008-08-12 12:16:03 by alexziaee