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)

The following reply was made to PR bin/45130; it has been noted by GNATS.

From: "Greg A. Woods" <>
Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing 
Date: Mon, 11 Jul 2011 18:16:49 -0700

 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 At Sun, 10 Jul 2011 13:46:24 +0000 (UTC), wrote:
 Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames contain=
 ing spaces)
 > Synopsis: /etc/locate.conf cannot deal with pathnames containing spaces
 > State-Changed-From-To: open->feedback
 > State-Changed-By:
 > State-Changed-When: Sun, 10 Jul 2011 13:46:22 +0000
 > State-Changed-Why:
 > Does revision 1.12 of src/usr.bin/locate/locate/ 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:
 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 
 Planix, Inc. <>      Secrets of the Weird 
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 Version: GnuPG v1.4.9 (NetBSD)

Home | Main Index | Thread Index | Old Index