Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] Anyone interested in a mlocate spell?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Kevin Monceaux <Kevin AT RawFedDogs.net>
  • To: SourceMage Discuss mailing List <SM-Discuss AT Lists.IBiblio.org>
  • Subject: [SM-Discuss] Anyone interested in a mlocate spell?
  • Date: Thu, 23 Oct 2008 13:08:35 -0500 (CDT)

SourceMage Fans,

Would anyone be interested in a mlocate spell? mlocate is a locate replacement with the m standing for merge. Unlike plain locate's updatedb utility which completely rebuilds the locate database each time it's run mlocate's updatedb creates the locate database on the first run and on each subsequent run it just updates the existing database with any filesystem changes. So, each subsequent updatedb run is much faster.

I have a spell working on my system. It's my first attempt at creating a spell from scratch that goes "beyond the basics." So, it would probably benefit from the scrutiny of a spell guru or three. I've put a tarball of the spell up at:

http://www.RawFedDogs.net/mlocate-0.21-spell.tar.bz2

All suggestions/comments welcomed.

It needs a mlocate group. For testing I added such a group to my personal grimoire's groups file and the spell creates the group successfully.

I copied the updatedb.conf file from the findutils spell and modified it to work with mlocate.

In addition to the updatedb.conf file mlocate overwrites three files from findutils:

/usr/bin/locate

/usr/bin/updatedb

/usr/share/man/man1/locate.1

How should that be handled? A cleanse run reports the md5sum mismatches and says they match mlocate's logs so it removes the entries for the above files from findutils logs. If mlocate overwriting the above files from findutils is okay, does it need a trigger to cause mlocate to be reinstalled any time findutils is reinstalled?

On a similar note, I'm also working on a man-db spell, if anyone would be interested in it. It would be something one would use in place of the man spell. It contains a man pager and the utilities to search/update the whatis database. It handles whatis database updates similar to the way mlocate handles locatedb updates. But, I have to admit, it's speed isn't what caught my eye. It's man pager has a tiny cosmetic detail that I really like for some reason. When viewing a man page with SMGL's man pager, the status like looks something like:

lines 1-37

in reverse video. With man-db's pager, it displays the manpage's name and section. Using the sorcery man page as an example, it looks something like:

Manual page sorcery(8) line 1

in inverse video.

I have a man-db spell working well enough for my system, but I still have a few kinks to work out.


Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!





Archive powered by MHonArc 2.6.24.

Top of Page