Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1170047imm; Mon, 21 May 2018 23:02:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr7BfhQxi8L7EvkLNZcjlNRT2nCX9m6ry6mof5PamAFpvMHdiDiq5JyKDOzGb0Bc6CeFw3T X-Received: by 2002:a65:5c8c:: with SMTP id a12-v6mr8098365pgt.257.1526968940149; Mon, 21 May 2018 23:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526968940; cv=none; d=google.com; s=arc-20160816; b=D17BeSGQB/t9Qjc2klDTJEZcpOwIic41FXgS/VmZoKiwAqMLqxk52Hx7WSNgQ7wIhX +k9rnvjBXux/+aWgGNITLivcgvTssFkX0luQPc3tUfHbwRCnvvBgy2mEcvARt4OUxKtb AjnEk6OXmZ8ai2rv95pEAozIJL94BHNy9YPIZBbneZuKt+r0StQKbNAT0WThV5voLmCJ u8dlS/thiNWSr3hZMyEMMKb8eFxvFDc/sMf2G5gnOpkwd0vLJOm1wN9wWKzqlR72bJcl Brck2tXHCQ4/pgDzj6Q/ltdBIJ97hmoL++7PRPeQ10AdYRXPcm+q082QrydDsWpw5eUT YFmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=SEcrD7mQyu9EAZnrzERCYp5gzQujWb5zAcj86DWiXYw=; b=qL4dHWOjyA9oFL2N5iYwXvqIsskqoofPPNj161w/oRkEqU6on3EVJ7wYBoq3E558uM cTzyK95/FejM2gNvCQtX140pay9czdEUZNn5cxpsXKbQPiQPYNdaGUfkWQCv3QMRSeoT bodhTToSXs70e2+iPktVQAHji044p9C7Gxv5XI59erG8Bax85YCMIZwlFYEEJd98lUAc LFyjgS3jabxAR1pxO/JagrvGOle/Pxfafja7FW+Lr+YjIx2dMKwOnVsq7HNkdrSyM5Zi 1KsCT6abbE32bXjZWxEA/wSohYjrntpwOBwi3WIavqUTzfquNBD89tQTwauIRsixDBFq qxvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ukO/0F2I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w71-v6si12050663pgd.1.2018.05.21.23.02.04; Mon, 21 May 2018 23:02:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ukO/0F2I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbeEVGBy (ORCPT + 99 others); Tue, 22 May 2018 02:01:54 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:39198 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002AbeEVGBw (ORCPT ); Tue, 22 May 2018 02:01:52 -0400 Received: from mail-vk0-f49.google.com (mail-vk0-f49.google.com [209.85.213.49]) (authenticated) by conssluserg-01.nifty.com with ESMTP id w4M61mAs001651 for ; Tue, 22 May 2018 15:01:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com w4M61mAs001651 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526968909; bh=SEcrD7mQyu9EAZnrzERCYp5gzQujWb5zAcj86DWiXYw=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=ukO/0F2I65yoSOd1EPxceqqqBlQpMBAOr4wPkjmZjXdPk1In0+G4gdSGmLjnjjkG5 iYCOyVQu3iMcFMk1m0hp6EAY/Q9r/dcOR4f141sr4xOrj2BMe+wD6iBFsSD0QoIhpi D6NcPoOTgyIO1BUBnnRPsGGu4F9AxPkvpfTbVTSx3gb+MT7UTaOGHpKHBsxrJeDjJk U/iE9aVpvePeu8qWgqpC8ryoekdlfPhFG4FzGJa2O1eKLSyMB3zVHLdkUcPn7T7K6C 2xCllRnTKG8XsgaA6SNtxTsQ3lC2Gflx1K7/RMytm44MAXIO/hUk7bbwo6jGTTc+xo GeEDvJkNKMTnw== X-Nifty-SrcIP: [209.85.213.49] Received: by mail-vk0-f49.google.com with SMTP id t63-v6so10189315vkb.1 for ; Mon, 21 May 2018 23:01:48 -0700 (PDT) X-Gm-Message-State: ALKqPwdqsYLvC00NAU+0PK34MC7uupnk2M/9RbVQeaOZIh47gUmWPVk9 vmGLWgiXxGyLl1WKm8AASvGTggsvRCpp0qijwbc= X-Received: by 2002:a1f:8e4c:: with SMTP id q73-v6mr15093290vkd.65.1526968907600; Mon, 21 May 2018 23:01:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.85.216 with HTTP; Mon, 21 May 2018 23:01:07 -0700 (PDT) In-Reply-To: <20180518115619.jqb4hqdym7fmrs2p@gmail.com> References: <20180518115619.jqb4hqdym7fmrs2p@gmail.com> From: Masahiro Yamada Date: Tue, 22 May 2018 15:01:07 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] scripts/tags.sh: use `find` for $ALLSOURCE_ARCHS generation To: Joey Pabalinas Cc: Andrew Morton , Linux Kernel Mailing List , Arend van Spriel , Robert Jarzmik Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi. The commit log is wrong. 2018-05-18 20:56 GMT+09:00 Joey Pabalinas : > 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 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. > Replace this with a find-generated string > and directly assign it to $ALLSOURCE_ARCHS; a subshell is > implied by $(), so `cd` doesn't affect the current working > directory. This patch no longer uses `cd` > Signed-off-by: Joey Pabalinas > > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/scripts/tags.sh b/scripts/tags.sh > index 78e546ff689c2d5f40..c08347fdeef12a7621 100755 > --- a/scripts/tags.sh > +++ b/scripts/tags.sh > @@ -26,24 +26,15 @@ else > fi > > # ignore userspace tools > ignore="$ignore ( -path ${tree}tools ) -prune -o" > > -# Find all available archs > -find_all_archs() > -{ > - ALLSOURCE_ARCHS="" > - for arch in `ls ${tree}arch`; do > - ALLSOURCE_ARCHS="${ALLSOURCE_ARCHS} "${arch##\/} > - done > -} > - > # Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH > if [ "${ALLSOURCE_ARCHS}" = "" ]; then > ALLSOURCE_ARCHS=${SRCARCH} > elif [ "${ALLSOURCE_ARCHS}" = "all" ]; then > - find_all_archs > + ALLSOURCE_ARCHS="$(find "${tree}arch/" -mindepth 1 -maxdepth 1 -type d -printf ' %f')" > fi > > # find sources in arch/$ARCH > find_arch_sources() > { > -- > 2.17.0.rc1.35.g90bbd502d54fe92035.dirty > -- Best Regards Masahiro Yamada