Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Using 'locate' in sorcery?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jeremy Kolb <jkolb AT brandeis.edu>
  • To: Paul Mahon <dufflebunk AT dufflebunk.homeip.net>
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Using 'locate' in sorcery?
  • Date: Mon, 04 Apr 2005 11:32:10 -0400

Ah my bad. Sorry, I interpretted that as "It generally doesn't use it but now it does". Thanks for the clarification.

Jeremy

Paul Mahon wrote:
I thought the statement "Sorcery doesn't use locate" was pretty clear...
it means that the locate command is not used in any sorcery script. Here
is the result of a grep -r from the sorcery/devel directory of p4:
devel/ChangeLog: plus routines to locate grimoire/sorcery keys
devel/usr/sbin/gaze:## Display the section spells are located in
devel/usr/share/man/man1/gaze.1:those files are located, excludes sorcery
state files.
devel/var/lib/sorcery/modules/libdepends: locate base_deps
devel/var/lib/sorcery/modules/libgrimoire: gpg_verify_signature "$(locate_spell_file
$SFNAME)" $FILENAME "$(locate_spell_file $PFNAME)"
devel/var/lib/sorcery/modules/libgrimoire:## Given a file, locate_spell_file
finds out where it really is within
devel/var/lib/sorcery/modules/libgrimoire:function locate_spell_file() {
devel/var/lib/sorcery/modules/libdispel:## Find out where a spell is located

You will please note that the locate command is not used. That's why
there has been no discussion of using locate in sorcery.

On Mon, 2005-04-04 at 10:56 -0400, Jeremy Kolb wrote:

If sorcery now requires the use of locate then shouldn't it be the developer's job to install such a cron script by default? Otherwise this becomes a big annoyance for the user.

Jeremy


Paul Mahon wrote:

Sorcery doesn't use locate, it generally uses find... if you were asking
why sorcery uses it.
If you were asking the more general question, "Why use locate?" Here's
why:
Updatedb can be scheduled to run at a time when you're not using the
computer (5am on Sundays is usually good for me), this keeps the db up
to date, and locating a file takes a fraction of a second. It takes
about as long to do an updatedb as it takes to do a 'find /' and with
locate you can do multiple lookups without having to search the whole HD
each time.

On Mon, 2005-04-04 at 10:23 -0400, Jeremy Kolb wrote:


But why use locate? I never run updatedb and after awhile the db gets horribly out of synch. Updatedb also takes a ridiculous amount of time to run. What is locate doing in sorcery? Why not use find?

Jeremy


Paul Mahon wrote:


locate is provided by findutils, which is still part of the base system.
You will need to run updatedb at least once as root to create the
locatedb file. I don't think it runs it automaticaly, and I don't think
it sets up a cron job to do it either.

On Mon, 2005-04-04 at 09:15 -0500, sergey AT optimaltec.com wrote:



It looks like the latest devel sorcery is using `locate.' I can see the
messages
that /var/cache/locatedb is missing. I don't think locate is part of the
basesystem. Any reason for this?
Thanks!

Sergey.
_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss



------------------------------------------------------------------------

_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss

_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss



------------------------------------------------------------------------

_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss

_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss



------------------------------------------------------------------------

_______________________________________________
SM-Discuss mailing list
SM-Discuss AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/sm-discuss





Archive powered by MHonArc 2.6.24.

Top of Page