On Tue, May 22, 2018 at 03:01:07PM +0900, Masahiro Yamada wrote: > The commit log is wrong. > > > 2018-05-18 20:56 GMT+09:00 Joey Pabalinas <[email protected]>: > > Parsing `ls` is fragile at best and _will_ fail when $tree > > contains spaces. > > This statement is wrong. > > The cause of the problem is not using whatever command you use, > but missing quoting. > The following would work even if $tree contains spaces: > > for arch in `ls "${tree}arch"`; do
Ah, to be completely honest that case didn't even occur to me.
> BTW, what was your motivation of this patch?
>
> Does ${tree} contain spaces?
>
> If the file path contains spaces, the top Makefile terminates it earlier.
>
> Makefile:128: *** main directory cannot contain spaces nor colons. Stop.
It doesn't; I didn't realize the Makefile already had a guard against
spaces in paths. It was something I noticed when poking at something
else and I thought it might be something worth fixing.
But now I agree with you that this patch isn't really needed at all. I can
no longer think of a case where even the original
> for arch in `ls ${tree}arch`; do
would break since spaces are not allowed at all.
Well, on the bright side, the times you happen to be wrong are also the
times where you learn the most :)
--
Cheers,
Joey Pabalinas
signature.asc
Description: PGP signature

