Cast Options
- -B, --recast-up
- Recasts all the spells that depend on the given spell(s) (and the ones they depend on, and so on). -c is also helpful to make sure that everything is recompiled instead of merely being resurrected.
- -b, --force-base-dep
- Force all spells to depend on basesystem.
- -c, --compile
- Compiles spell, even if there is a compile cache in /var/cache/sorcery. Otherwise, it would just resurrect (untar) it. Helpful when the system configuration changes.
--cflags <flags> | "<flags ...>"
--cxxflags <flags> | "<flags ...>"
--ldflags <flags> | "<flags ...>"
--cppflags <flags> | "<flags ...>"
- Set custom cflags/cxxflags/ldflags/cppflags values to override those found in arch specs, and set through the sorcery menu. May need quotes.
- -d, --download
- Forces redownloading of sources, sources are freshly downloaded even when we already have them.
- --deps
- Determines dependencies for the given spell(s) and casts the dependencies, but does not cast the given spell(s) itself.
--from <directory>
- Specify an alternate directory to search for cached sources. An alternate to /var/spool/sorcery. Usually it is recommended to copy the source to /var/spool/sorcery instead.
-g, --grimoire <grimoire> | "<grimoire ...>"
- Use only the specified grimoires for this cast. NOTE: If there are any cross-grimoire dependencies on unspecified grimoires, then they will not work, because the target spell cannot be found. To avoid this, specify all relevant grimoires to the -g parameter in the order to be searched.
- -h, --help
- Display short help.
- --no-opts
- Disable the use of optimization flags from arch specs and the sorcery menu, only use those specified on the command line with --cflags, --cxxflags, or --ldflags. This is a handy fallback to see if a spell fails because of its flags.
-O, --recast-optional <option>
- If a spell being built has spells which could optionally depend on it, but those dependencies are disabled, ask to recast the dependee. Option can be one of: "always", "ask-yes", "ask-no", or "ignore"; it defaults to what is set via the sorcery menu. Implies -c.
- --queue
- Re-casts all spells in the install queue, as generated for example by sorcery queue
- -R, --recast-down
- recasts all the spells the given spell(s) depend on (and the ones they depend on ...). -c is also helpful to make sure that everything is recompiled instead of merely being resurrected. A lot of spells may be recast.
- -r, --reconfigure
- This will prompt again for optional dependencies and configuration options, even those answered before. Implies -c.
- -s
- Summon all spells first before casting. Normal behavior is to summon in the background while compiling.
- -V on | off
- Overrides the VOYEUR option, which specifies whether or not compile output should be displayed. Helpful to track down errors if it is normally off.
-Z, --lazy-updates <options>
- Perform updates on installed spells that need updates. Optional parameter are the same as --recast-optional.
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''.
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) summon
- 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. Required and runtime dependencies are automatically installed. Required dependencies are usually compile-time dependencies compared to runtime dependencies which could be scheduled later than the dependee itself. Optional dependencies enable new features and are compile-time dependencies. Suggested dependencies are optional runtime dependencies that should not need the spell to be recompiled to use.
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.
