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" <woods%planix.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: netbsd-bugs%netbsd.org@localhost,
        gnats-admin%netbsd.org@localhost
Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames containing 
spaces)
Date: Mon, 11 Jul 2011 18:16:49 -0700

 --pgp-sign-Multipart_Mon_Jul_11_18:16:29_2011-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 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 contain=
 ing spaces)
 >=20
 > Synopsis: /etc/locate.conf cannot deal with pathnames containing spaces
 >=20
 > 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).
 
 
 --=20
                                                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>
 
 --pgp-sign-Multipart_Mon_Jul_11_18:16:29_2011-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (NetBSD)
 
 iD8DBQBOG6BtZn1xt3i/9H8RApKeAJ9PN80laqJ5hBvt+xjtx5qxaUbn7ACgxOzw
 vLmN4IxIVuvFW8gkJM43cm0=
 =COfl
 -----END PGP SIGNATURE-----
 
 --pgp-sign-Multipart_Mon_Jul_11_18:16:29_2011-1--
 


Home | Main Index | Thread Index | Old Index