2018-05-22 17:21 GMT+09:00 Joey Pabalinas <joeypabali...@gmail.com>: > 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 <joeypabali...@gmail.com>: >> > 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 :) >
I see some new motivations for this patch now. - The current code includes 'Kconfig' in ALLSOURCE_ARCHS, but it should not. - Simplify the code, removing the find_all_archs(). If you are motivated for v5, how about this? - Remove the double-quotes from "${tree}arch/" (Because the rest parts of this script do not have double-quoting, I do not see point in adding it in this line only.) - Update the git-log to not mention the hypothetical space things. -- Best Regards Masahiro Yamada