From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 15 Feb 2023 21:08:03 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pSO4S-008knZ-SW for lore@lore.pengutronix.de; Wed, 15 Feb 2023 21:08:03 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pSO4P-0001Nt-Me; Wed, 15 Feb 2023 21:08:01 +0100 Received: from mout.kundenserver.de ([217.72.192.73]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSO47-0001NM-9a; Wed, 15 Feb 2023 21:07:43 +0100 Received: from methusalix.internal.home.lespocky.de ([92.117.62.247]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPoPd-1pFVmf1km3-00Mrjn; Wed, 15 Feb 2023 21:07:42 +0100 Received: from falbala.internal.home.lespocky.de ([192.168.243.94]) by methusalix.internal.home.lespocky.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pSO43-0006NJ-Sk; Wed, 15 Feb 2023 21:07:41 +0100 Date: Wed, 15 Feb 2023 21:07:35 +0100 From: Alexander Dahl To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Message-ID: Mail-Followup-To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , ptxdist@pengutronix.de References: <20230210160258.12558-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mk+NrLRnGrhTztWz" Content-Disposition: inline In-Reply-To: <20230210160258.12558-1-u.kleine-koenig@pengutronix.de> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/2.0.5 (2021-01-21) X-Scan-Signature: 7aa91fdd43207b5d0c40576660a3e49e X-Provags-ID: V03:K1:CHDXzXh8wx7ik91hTcR7iGeiEvvtzTvdYk6WvV/xDVZx7AXlKDd 8+ucpHu72kFZug5loZWTfluk7a+yvNnPg/jpipANrsHmznuCo9jaENb6pwzQEMd2Sf1m3bN wCcZelQU/vYUS8N13h5uvxlwOgWwYmh+KruiKSVKiNL5EUHcai7Y7308MLUta9dJV1f/Rt3 FQO+voyVrUL9EQWWILvOg== UI-OutboundReport: notjunk:1;M01:P0:WKZ4K4ypA9A=;vIAXWuyM0o2a8DnTONCFDz003JL lN84TUW6yYHFRQj3mcFJ+hEXa2tnGXRRCVLNZPos0PNndBci0sUl2nPBusN0UBMhSdfmL40lZ Tiwz3qeLibs7vrRaVjIwDWYZqfsucklwPetKrAw3S7cpa1az2rFUejjLHlNUK/g7a/tPMNtwp OPqjAwfZvt12HyfvNvZ6LbcU/0AoPTeinsByv8HxRACe8kcKrzsmuQYbU9i3anQ5u5zy/EgNl Hsde/QymH7B1XgbFdNAcjhQbC6ztBRxj0L8ZoFQxlg/8EqVWFyFx+Jyi6DRlIAiNGXlEjVDV4 nxlc54/p86kSVJI1DoqSaRBCRYFulPjV2C6a1wLxuQlJo+uAPyIvuRRUyhV6D0LrtKWtrS59c IxzNUCVX0qa0lLw2x/5ONmpLsZNcLOAzYHnLLflFIgOxgi8ya4+gs++eU1MTahAoKmk5Ubjln Kxs92UIYbIXJjSGyJRUpKFt6POVJ8nc43iWX2oK5B4H+VB7urnig+y81nSvNvrwkTqDMatsYG cLwgIpmz6SFve3tfq7i1llgk5UXtfF5KD37gPcDzuissNWz9LFjbMfHm8Kj2OfBV+VOwU/Lk/ 8LT1MiyeQh38v1TuOcHXZx8EwwGfplCMc2BdZiaP06YTKydPp7KCmPMp7jMKGSN8EzBn6FH1D w5qYUFMRFnrK0n7XVDaPSfibun71Jnosv+FkdsONWg== X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH] ptxd_make_world_compile_commands_filter: Fix grep for uptodate check X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false --mk+NrLRnGrhTztWz Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Moin, Am Fri, Feb 10, 2023 at 05:02:58PM +0100 schrieb Uwe Kleine-K=F6nig: > The intend here is to check the return code of grep, no need to call [ > (i.e. test). This fixes an error message: >=20 > environment: line 10: [: syntax error: `-q' unexpected >=20 > Additionally add -e to force interpretation of > "${PTXDIST_CROSS_CPPFLAGS}" as pattern. For me > ${PTXDIST_CROSS_CPPFLAGS} starts with -isystem; without -e this is > interpreted as option to grep instead of pattern which makes grep emit >=20 > grep: invalid option -- 't' >=20 > .) >=20 > Also add -F to make grep use a fixed-string compare (instead of > interpreting ${PTXDIST_CROSS_CPPFLAGS} as regexp). All this makes sense. Thumbs up. >=20 > Fixes: ac0aac7fc727 ("impove compile_commands.json handling") > Signed-off-by: Uwe Kleine-K=F6nig > --- > scripts/lib/ptxd_make_world_compile_commands.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/scripts/lib/ptxd_make_world_compile_commands.sh b/scripts/li= b/ptxd_make_world_compile_commands.sh > index 56d7378fa28b..2703b5497799 100644 > --- a/scripts/lib/ptxd_make_world_compile_commands.sh > +++ b/scripts/lib/ptxd_make_world_compile_commands.sh > @@ -21,7 +21,7 @@ ptxd_make_world_compile_commands_filter() { > fi > =20 > if [ "${src_cmds}" =3D "${dst_cmds}" ]; then > - if [ grep -q "${PTXDIST_CROSS_CPPFLAGS}" "${src_cmds}" ]; then > + if grep -q -F -e "${PTXDIST_CROSS_CPPFLAGS}" "${src_cmds}"; then Acked-by: Alexander Dahl Greets Alex > ptxd_warning "compile_commands.json is already up to date!" > return > fi > --=20 > 2.39.0 --=20 /"\ ASCII RIBBON | =BBWith the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.=AB / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) --mk+NrLRnGrhTztWz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEwo7muQJjlc+Prwj6NK3NAHIhXMYFAmPtO4MACgkQNK3NAHIh XMb5ihAAwwQjnAH+XpSV1cYXHM60cvSEYFw4IkdHdUcy6sDsDmXlfjKkQb7EuUki esBSXiARJNCr+ohOwBY0S8X3s2Lto1UX8/Udg1khEPXW10s5JX0cChgJoTl9Cx15 dcuoel4qOp4bpFmBMegwr1nmKWEj+Yy3PQWYLtEzZ/DRzk+piHfaWdjr/ZCoS35y dZfp6OdNglX7I0mAOS7T3Z9AY3m5x6FvIeoBl6MudPhcT8Xo1j8NJhCydmmbWGdp GFEireVKzNAfs9PjkMHUeHe9GTry6NCU/XUKBOniJzrw0XQfPZfEee945x2oYjAw Q/RftfRk4/TCvVSkCOwJJOOIPitLbtyMgC7bFbTjvUpw8Hala8YoIwo4Jmks5mnD pF4vtcYpZedGgp53xpLbqQLbKppNuK+xSkjob+KePSqfL/s6sNmJlfs6lYIQphdT +Aw7Wn389xyDlJKcqPSlzSUwEvHk6GRZDdt4zRHYhGMOp5sNGQYH0DvuZlLAz008 Y3mlgr4HfpJiSGWfnCU9zoCL9ONMakWCsgkTagZkkn2wIOnHUwTsNBfz72fXOh6O kKqsLLt3lR1mfG1do6jT6afpDbUWU9zNWpnIO7+xp+rQZKCR5RrBQsmUkCtgU2o/ lj1bPhEnAC9jM9s1KUCDigHPApayM8FQxCwRoJcJ5uVhXGnOans= =CJjP -----END PGP SIGNATURE----- --mk+NrLRnGrhTztWz--