Magic gets a database and more streamlining!
Date: Saturday, January 10 2004 @ 02:05:44 UTC
Topic: Gentoox

I REALLY hope no one ran magic within the last 4 hours because I totally rewrote the way it handles patches. Instead of adding files in "/etc/conf.d/" when a patch is installed, then removing this file when the patch is "fix'ed", it now adds all the information in one file called "/etc/conf.d/magic-database". This not only reduces clutter but makes it MUCH easier for me to maintain. Again, DONT USE MAGIC YET. I need to fully test the changes!

In addition to this, I've aliased all the text colour codes used in Magic - this should make reading/ writing the code a LOT easier. If you have a particularly old version of magic, this may cause it to go black and white whilst its telling you to restart magic ;)

I've also added a lock which stops you from running more than one instance of magic at the same time. The lock can also be bypassed if the need be by hitting Ctrl-C whilst the warning message is being displayed.

Gah, I just can't stop! All of the patching is now done by a single routine, as is the "magic available" list, again, this helps me with coding no end! Hopefully you, the user, wont notice any difference except improved stability.

The magic-database file is now backedup each time you run magic to '/etc/conf.d/magic.backup/' and is timestamped. Should your database become corrupt, you can simply replace it with one of these backups!

This article comes from Gentoox

The URL for this story is: