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: Alan Barrett <apb%netbsd.org@localhost>
To: NetBSD GNATS <gnats-bugs%netbsd.org@localhost>
Cc:
Subject: Re: bin/45130 (/etc/locate.conf cannot deal with pathnames
containing spaces)
Date: Wed, 13 Jul 2011 10:07:22 +0200
On Tue, 12 Jul 2011, Greg A. Woods wrote:
> Testing revealed you got the '!' stripping backwards for the
> "ignorefs" directive.
Oops! I fixed that in a different way, by introducing a new variable.
> Also, I added back the warning about running as root, just as a
> suggestion. Indeed it should be a separate PR, but.... :-)
The original code didn't have such a warning, and I didn't notice
it in your patch. If we want something like that, then I'd
suggest testing for user != "nobody", not uid == 0. This sort of
change needs discussion in tech-userlevel; please suggest it there
if you want to pursue it.
> Also, I separated the case clause ";;" terminators -- I really
> don't like scrunching code together too much -- makes it too
> hard to read.
I have done some of what you suggested.
> I removed a bit of extra, unnecessary, quoting (it makes syntax
> highlighting work better and cleans up the readability). :-)
>
> I.e. these two must always produce the same value (and they do
> on NetBSD for both sh and ksh, and even for bash and zsh):
>
> BAR=$(echo "foo bar ")
> BAR="$(echo "foo bar ")"
I find it more readable when the extra quotes are present. It's a
clear signal to the reader that the value is not subjected to word
splitting.
>I added a comment about the "extra" cat
OK.
>In some ways the quoted-parameter handling by use of the special case
>quoted "$@" should probably also be documented -- in my experience it's
>a relatively rare idiom (all too rare, perhaps).
"$@" is much too common to deserve commenting, but I commented
the use of eval "set -- $args".
>Finally I fixed a style nit with the "if" after the find call.
OK.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index