NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing spaces)



At Sun, 10 Jul 2011 13:46:24 +0000 (UTC), apb%NetBSD.org@localhost wrote:
Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing 
spaces)
> 
> Synopsis: /etc/locate.conf cannot deal with pathnames containing spaces
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: apb%NetBSD.org@localhost
> State-Changed-When: Sun, 10 Jul 2011 13:46:22 +0000
> State-Changed-Why:
> Does revision 1.12 of src/usr.bin/locate/locate/updatedb.sh fix this?

I think so -- I haven't tested it yet, but conceptually it looks right,
and I assume you've tested it some!

Thanks for reminding me about using 'read -r', 'set', and "$@" -- I
forgot about how the latter could work with a "for" statement to keep
quoting in place!

I see you caught some other minor bugs too!  :-)

The appearance of shell_quote() reminds me of this:

    http://mail-index.netbsd.org/tech-userlevel/2008/09/05/msg001147.html

or at least adding "%q" or similar to printf(1) using shquote(3).  :-)
(and maybe "%v" with several option flag using strvis(3))


Now if we could just get every other *BSD and derivative to adopt this
version of locate.conf(5) verbatim.  (OS X is of course where I first
ran into the problem, and they're still using the hokey shell variables
mechanism from FreeBSD for their /etc/locate.rc.)

Next, on to maybe adopting some of FreeBSD's fixes for managing the size
during processing of large locate lists.  I have 110 million files on my
desktop machine, apparently, and that's on a less than half-full 1TB
drive.  The find will probably run for more than 72 hours (at nice -10).


-- 
                                                Greg A. Woods

+1 250 762-7675                                RoboHack 
<woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>      Secrets of the Weird 
<woods%weird.com@localhost>

Attachment: pgpRE7IDfv7YG.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index