[{"id":17013,"web_url":"https://patchwork.libcamera.org/comment/17013/","msgid":"<a704a4e8-9ef4-2d2b-f35f-c56ad9225fbe@ideasonboard.com>","date":"2021-05-19T08:43:15","subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Paul,\n\nOn 19/05/2021 06:25, Paul Elder wrote:\n> Add a script to ease updating mojo from a chromium source tree.\n\nThis sounds better than manually trying to import each time, and ensures\nthe process and files required are (self)documented.\n\n\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> Note that this script includes the little patch to template_expander.py\n> to enable it to work with jinja2 3.0.0 (it still works with jinja2\n> 2.10.x).\n> ---\n>  utils/update-mojo.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 68 insertions(+)\n>  create mode 100755 utils/update-mojo.sh\n> \n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> new file mode 100755\n> index 00000000..a57ea968\n> --- /dev/null\n> +++ b/utils/update-mojo.sh\n> @@ -0,0 +1,68 @@\n> +#!/bin/sh\n> +\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +# Update mojo copy from a chromium source tree\n> +\n> +if [ $# != 1 ] ; then\n> +\techo \"Usage: $0 <chromium dir>\"\n> +\texit 1\n> +fi\n> +\n> +ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n\nWow, that's some interesting quoting.\ni didn't realise you could split things up quite like that though.\n\nI can't tell how quotes get parsed ... (swapping \" \" for [ ]) :\n\nA)\n  ipc_dir=\"$(dirname \"   $(realpath    \"$0\"   )   \")/ipc\"\n  ipc_dir=[$(dirname ]   $(realpath    [$0]   )   [)/ipc]\n          [          ]                 [  ]       [     ]\n\nor\nB)\n\n  ipc_dir=\"$(dirname \"   $(realpath    \"$0\"   )   \")/ipc\"\n  ipc_dir=[$(dirname [   $(realpath    [$0]   )   ])/ipc]\n          [          [                 [  ]       ]     ]\n\nOr maybe it doesn't matter and it works...\n\nI always thought quotes were parsed as A (sequential quotes open and\nclose the quote), but that wouldn't make sense as a functional line to\nme, so I would expect B) to be the desired quoting, where a balanced\nstring opens the quotes then closes them again...\n\n\n\n\n\n> +chromium_dir=\"$1\"\n> +\n> +if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n> +\techo \"Directory ${chromium_dir} doesn't contain mojo\"\n> +\texit 1\n> +fi\n> +\n> +if [ ! -d \"${chromium_dir}/.git\" ] ; then\n> +\techo \"Directory ${chromium_dir} doesn't contain a git tree\"\n> +\texit 1\n> +fi\n> +\n> +# Get the chromium commit id\n> +version=$(git -C \"${chromium_dir}\" rev-parse --short HEAD)\n> +\n> +# Reject dirty trees\n> +if ! test -z \"$(git -C \"${chromium_dir}\" status --porcelain)\" ; then\n> +\techo \"Chromium tree in ${chromium_dir} is dirty\"\n> +\texit 1\n> +fi\n> +\n> +# Copy the diagnosis file\n> +cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n> +\n> +# Copy the rest of mojo\n> +cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n> +\n> +last_dir=\"$(pwd)\"\n> +cd \"${chromium_dir}\" || exit\n> +find \"./mojo/public/tools\" -type f \\\n> +     -not -path \"*/generators/*\" \\\n> +     -not -path \"*/fuzzers/*\" \\\n> +     -exec cp --parents \"{}\" \"${ipc_dir}\" \";\"\n> +cd \"$last_dir\" || exit\n> +\n> +# Update the README files\n> +readme=$(cat <<EOF\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +Files in this directory are imported from ${version} of Chromium. Do not\n\nNice touch automatically specifying the imported version!\n\n> +modify them manually.\n> +EOF\n> +)\n> +\n> +echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n> +echo \"$readme\" > \"${ipc_dir}/tools/README\"\n> +\n> +# Fix mojo support for jinja2 3.0.0\n> +template_expander=\"${ipc_dir}/mojo/public/tools/mojom/mojom/generate/template_expander.py\"\n> +sed -i \"/py_compile=.*$/d\" \"${template_expander}\"\n\nInteresting that we would need to carry a manual patch like that - but\nif that's the solution, I think it's fine for now.\n\nHopefully upstream will deal with this in the future, assuming it\naffects other users, at which point this can be removed.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> +\n> +cat <<EOF\n> +------------------------------------------------------------\n> +mojo updated. Please review and up-port local changes before\n> +committing.\n> +------------------------------------------------------------\n> +EOF\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7D880C31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 May 2021 08:43:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 876086891D;\n\tWed, 19 May 2021 10:43:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6AAF68911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 May 2021 10:43:18 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 260F645E;\n\tWed, 19 May 2021 10:43:18 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"h1WE8Tel\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621413798;\n\tbh=2Crv+SoPcQCc5g8XbIUDHPRsmRxy4F/mqM3NhflamOs=;\n\th=Reply-To:To:References:From:Subject:Date:In-Reply-To:From;\n\tb=h1WE8TelMQ3jGG/erAnoQP0ti/8g0sAF1/gzLupHP0grJGIOoCG+2ASuUOQmVJ2kl\n\tOtCL+Ci7APTDNtHojdUu7Ieo2TKTVGrM6vSZyklUUvkeIYanxK6AsNLi+bVqwGJGGH\n\tyeUSNClIDuxd1PrqKyuOufIh/J+VK/Kn9MRmrCwY=","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210519052510.899058-1-paul.elder@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<a704a4e8-9ef4-2d2b-f35f-c56ad9225fbe@ideasonboard.com>","Date":"Wed, 19 May 2021 09:43:15 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210519052510.899058-1-paul.elder@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Reply-To":"kieran.bingham@ideasonboard.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17014,"web_url":"https://patchwork.libcamera.org/comment/17014/","msgid":"<20210519102712.GA902042@pyrite.rasen.tech>","date":"2021-05-19T10:27:12","subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, May 19, 2021 at 09:43:15AM +0100, Kieran Bingham wrote:\n> Hi Paul,\n> \n> On 19/05/2021 06:25, Paul Elder wrote:\n> > Add a script to ease updating mojo from a chromium source tree.\n> \n> This sounds better than manually trying to import each time, and ensures\n> the process and files required are (self)documented.\n> \n> \n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > \n> > ---\n> > Note that this script includes the little patch to template_expander.py\n> > to enable it to work with jinja2 3.0.0 (it still works with jinja2\n> > 2.10.x).\n> > ---\n> >  utils/update-mojo.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++\n> >  1 file changed, 68 insertions(+)\n> >  create mode 100755 utils/update-mojo.sh\n> > \n> > diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> > new file mode 100755\n> > index 00000000..a57ea968\n> > --- /dev/null\n> > +++ b/utils/update-mojo.sh\n> > @@ -0,0 +1,68 @@\n> > +#!/bin/sh\n> > +\n> > +# SPDX-License-Identifier: GPL-2.0-or-later\n> > +# Update mojo copy from a chromium source tree\n> > +\n> > +if [ $# != 1 ] ; then\n> > +\techo \"Usage: $0 <chromium dir>\"\n> > +\texit 1\n> > +fi\n> > +\n> > +ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n> \n> Wow, that's some interesting quoting.\n> i didn't realise you could split things up quite like that though.\n\nI copied it from what Laurent wrote in update-kernel-headers.sh :D\n\n> \n> I can't tell how quotes get parsed ... (swapping \" \" for [ ]) :\n> \n> A)\n>   ipc_dir=\"$(dirname \"   $(realpath    \"$0\"   )   \")/ipc\"\n>   ipc_dir=[$(dirname ]   $(realpath    [$0]   )   [)/ipc]\n>           [          ]                 [  ]       [     ]\n> \n> or\n> B)\n> \n>   ipc_dir=\"$(dirname \"   $(realpath    \"$0\"   )   \")/ipc\"\n>   ipc_dir=[$(dirname [   $(realpath    [$0]   )   ])/ipc]\n>           [          [                 [  ]       ]     ]\n\nI've noticed elsewhere in this script though that it seems to nest\ndouble quotes properly.\n\n> \n> Or maybe it doesn't matter and it works...\n> \n> I always thought quotes were parsed as A (sequential quotes open and\n> close the quote), but that wouldn't make sense as a functional line to\n> me, so I would expect B) to be the desired quoting, where a balanced\n> string opens the quotes then closes them again...\n> \n> \n> \n> \n> \n> > +chromium_dir=\"$1\"\n> > +\n> > +if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n> > +\techo \"Directory ${chromium_dir} doesn't contain mojo\"\n> > +\texit 1\n> > +fi\n> > +\n> > +if [ ! -d \"${chromium_dir}/.git\" ] ; then\n> > +\techo \"Directory ${chromium_dir} doesn't contain a git tree\"\n> > +\texit 1\n> > +fi\n> > +\n> > +# Get the chromium commit id\n> > +version=$(git -C \"${chromium_dir}\" rev-parse --short HEAD)\n> > +\n> > +# Reject dirty trees\n> > +if ! test -z \"$(git -C \"${chromium_dir}\" status --porcelain)\" ; then\n> > +\techo \"Chromium tree in ${chromium_dir} is dirty\"\n> > +\texit 1\n> > +fi\n> > +\n> > +# Copy the diagnosis file\n> > +cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n> > +\n> > +# Copy the rest of mojo\n> > +cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n> > +\n> > +last_dir=\"$(pwd)\"\n> > +cd \"${chromium_dir}\" || exit\n> > +find \"./mojo/public/tools\" -type f \\\n> > +     -not -path \"*/generators/*\" \\\n> > +     -not -path \"*/fuzzers/*\" \\\n> > +     -exec cp --parents \"{}\" \"${ipc_dir}\" \";\"\n> > +cd \"$last_dir\" || exit\n> > +\n> > +# Update the README files\n> > +readme=$(cat <<EOF\n> > +# SPDX-License-Identifier: CC0-1.0\n> > +\n> > +Files in this directory are imported from ${version} of Chromium. Do not\n> \n> Nice touch automatically specifying the imported version!\n> \n> > +modify them manually.\n> > +EOF\n> > +)\n> > +\n> > +echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n> > +echo \"$readme\" > \"${ipc_dir}/tools/README\"\n> > +\n> > +# Fix mojo support for jinja2 3.0.0\n> > +template_expander=\"${ipc_dir}/mojo/public/tools/mojom/mojom/generate/template_expander.py\"\n> > +sed -i \"/py_compile=.*$/d\" \"${template_expander}\"\n> \n> Interesting that we would need to carry a manual patch like that - but\n> if that's the solution, I think it's fine for now.\n\nI still need to update the bugzilla on this, but basically this\nparameter exists in jinja2 2.10.x but not jinja2 3.0.0 which causes it\nto break, but the parameter is ignored in Python 3 anyway so it should\nbe fine to remove it.\n\nStill trying to figure out how I can send a patch upstream to\nchromium...\n\n> \n> Hopefully upstream will deal with this in the future, assuming it\n> affects other users, at which point this can be removed.\n> \n\nThey had a patch that prepared mojo to be compatible with Python 3 but\nstill left that flag as a possibility for Python 2, so not sure what\nthey were trying to do there.\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nThanks,\n\nPaul\n\n> \n> \n> > +\n> > +cat <<EOF\n> > +------------------------------------------------------------\n> > +mojo updated. Please review and up-port local changes before\n> > +committing.\n> > +------------------------------------------------------------\n> > +EOF\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8AEBDC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 May 2021 10:27:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECEF968919;\n\tWed, 19 May 2021 12:27:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B9DE602B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 May 2021 12:27:20 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A1BFA45E;\n\tWed, 19 May 2021 12:27:18 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"wAQNlyrY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621420039;\n\tbh=itfhypS91bCctQjZB0Kem8n7TINm8fgVzC5E1FoGtDo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=wAQNlyrYUDrcgSmXI4ZuLZbgj3I353ekqwTBXZLtcf47CUHUdQx0utx91macedoud\n\tkeJ+YR6uORTIH4fMWBPBRZhuON/og9mrZSxOXx9bepngrSvkBICB9Khb4yYqAn2Yoj\n\tjw55idY0UK/kNwL0XqskOIkDeMZ+zsMTaLvHZoF0=","Date":"Wed, 19 May 2021 19:27:12 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210519102712.GA902042@pyrite.rasen.tech>","References":"<20210519052510.899058-1-paul.elder@ideasonboard.com>\n\t<a704a4e8-9ef4-2d2b-f35f-c56ad9225fbe@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<a704a4e8-9ef4-2d2b-f35f-c56ad9225fbe@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17219,"web_url":"https://patchwork.libcamera.org/comment/17219/","msgid":"<YKxNFXb/tKA4v9Ea@pendragon.ideasonboard.com>","date":"2021-05-25T01:04:21","subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Wed, May 19, 2021 at 02:25:10PM +0900, Paul Elder wrote:\n> Add a script to ease updating mojo from a chromium source tree.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> Note that this script includes the little patch to template_expander.py\n> to enable it to work with jinja2 3.0.0 (it still works with jinja2\n> 2.10.x).\n> ---\n>  utils/update-mojo.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 68 insertions(+)\n>  create mode 100755 utils/update-mojo.sh\n> \n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> new file mode 100755\n> index 00000000..a57ea968\n> --- /dev/null\n> +++ b/utils/update-mojo.sh\n> @@ -0,0 +1,68 @@\n> +#!/bin/sh\n> +\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +# Update mojo copy from a chromium source tree\n> +\n> +if [ $# != 1 ] ; then\n> +\techo \"Usage: $0 <chromium dir>\"\n> +\texit 1\n> +fi\n> +\n> +ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n> +chromium_dir=\"$1\"\n> +\n> +if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n> +\techo \"Directory ${chromium_dir} doesn't contain mojo\"\n> +\texit 1\n> +fi\n> +\n> +if [ ! -d \"${chromium_dir}/.git\" ] ; then\n> +\techo \"Directory ${chromium_dir} doesn't contain a git tree\"\n> +\texit 1\n> +fi\n> +\n> +# Get the chromium commit id\n> +version=$(git -C \"${chromium_dir}\" rev-parse --short HEAD)\n> +\n> +# Reject dirty trees\n> +if ! test -z \"$(git -C \"${chromium_dir}\" status --porcelain)\" ; then\n\nYou can use [ instead of test\n\nif [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n\n> +\techo \"Chromium tree in ${chromium_dir} is dirty\"\n> +\texit 1\n> +fi\n> +\n> +# Copy the diagnosis file\n> +cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n> +\n> +# Copy the rest of mojo\n> +cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n> +\n> +last_dir=\"$(pwd)\"\n> +cd \"${chromium_dir}\" || exit\n> +find \"./mojo/public/tools\" -type f \\\n\nYou can drop quotes around strings that are guaranteed not to need them.\n\n> +     -not -path \"*/generators/*\" \\\n> +     -not -path \"*/fuzzers/*\" \\\n> +     -exec cp --parents \"{}\" \"${ipc_dir}\" \";\"\n> +cd \"$last_dir\" || exit\n\nYou can create a scope instead of restoring to the last_dir manually.\n\n(\n\tcd \"${chromium_dir}\" || exit\n\tfind ./mojo/public/tools -type f \\\n\t     -not -path \"*/generators/*\" \\\n\t     -not -path \"*/fuzzers/*\" \\\n\t     -exec cp --parents {} \"${ipc_dir}\" \";\"\n)\n\nShould the script first empty the mojo/publics/tools/ directory, in case\nupstream deletes some files ?\n\n> +\n> +# Update the README files\n> +readme=$(cat <<EOF\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +Files in this directory are imported from ${version} of Chromium. Do not\n> +modify them manually.\n> +EOF\n> +)\n> +\n> +echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n> +echo \"$readme\" > \"${ipc_dir}/tools/README\"\n> +\n> +# Fix mojo support for jinja2 3.0.0\n\nWith a link to\nhttps://chromium-review.googlesource.com/c/chromium/src/+/2908396 in\norder to drop this when the fix will be integrated,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +template_expander=\"${ipc_dir}/mojo/public/tools/mojom/mojom/generate/template_expander.py\"\n> +sed -i \"/py_compile=.*$/d\" \"${template_expander}\"\n> +\n> +cat <<EOF\n> +------------------------------------------------------------\n> +mojo updated. Please review and up-port local changes before\n> +committing.\n> +------------------------------------------------------------\n> +EOF","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6C5B2C3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 01:04:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6FD3868919;\n\tTue, 25 May 2021 03:04:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C623601A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 03:04:28 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F0E1344;\n\tTue, 25 May 2021 03:04:27 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"d/PAaRyN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621904667;\n\tbh=EoY/Ax1ce2ZXMkhFWKAtjDwPGrx4+53PN2Eg5V/yT3s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=d/PAaRyN8zHwL+aX3XlN6isH0/bWeqXY2uGDQlNw7aQwevop8FXFF6Fz5PFou3BuP\n\tkjdhLqbaagfVWgLFvbj6mcpnTiCNki/BpoKk5FpeITj84sir7ehUF+BkXhB0KF4AWc\n\tTUSjbDxrlJamYaIXjAE8eW685CkOK4+uzdzorXaI=","Date":"Tue, 25 May 2021 04:04:21 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YKxNFXb/tKA4v9Ea@pendragon.ideasonboard.com>","References":"<20210519052510.899058-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210519052510.899058-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] utils: update-mojo.sh: Add script for\n\tupdating mojo","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]