[SM-Discuss] Stable Sorcery 1.12.0 Released!

Arwed von Merkatz v.merkatz at gmx.net
Sat Apr 16 05:18:00 EDT 2005


On Fri, Apr 15, 2005 at 05:58:36PM -0700, Andrew Stitt wrote:
> The long awaited stable sorcery 1.12.0 has been released!

Thanks to the sorcery team for this :)

[...] 
> Things primarily of interest to spell writers:
> 
> * new filter functions, in addition to excluded and protected there are
> now "volatiles" and "configs" filter files. Volatile files are ignored
> by cleanse's md5sum check. Config's are treated more carefully by dispel
> and resurrect, config files aren't blatently replaced or removed if we
> detect they are changed. Spell's can also have their own spell level
> filters by just adding a file by the name of the filter to the spell
> directory. The format has also changed to regexp.
> 
> * run_script trigger now actually works
> 
> * theres some new functions to assist with installing config files nicely
> 
> * cross grimoire depends http://wiki.sourcemage.org/index.php?page=Cross+Grimoire+Depends

Another new function in libapi that I didn't see in the changelog is
"get_spell_provider". With this function a spell can know which provider
was used for a certain dependency. This is of interest for spells that
need different options for different providers, e.g. galeon2
The current galeon2 spell uses the following to determine options:
if spell_ok mozilla; then
   OPTS="$OPTS --with-mozilla=mozilla"
else
   OPTS="$OPTS --with-mozilla=firefox"
fi &&

With the new function this would look like:
if test $(get_spell_provider $SPELL GECKO) == "firefox"; then
  OPTS="$OPTS --with-mozilla=firefox"
else
  OPTS="$OPTS --with-mozilla=mozilla"
fi

The advantage of this is that the choice the user makes for the provider
actually gets used if he has both mozilla and firefox installed.
mozilla/firefox is an obvious example for the usage of this function as
there are now several apps that can be built against both, but I'm sure
there are other providers for which this is useful too.

-- 
Arwed v. Merkatz                              Source Mage GNU/Linux developer
                                                    http://www.sourcemage.org



More information about the SM-Discuss mailing list