[{"id":28378,"web_url":"https://patchwork.libcamera.org/comment/28378/","msgid":"<87mstkum9y.fsf@redhat.com>","date":"2024-01-05T10:06:49","subject":"Re: [libcamera-devel] [PATCH 1/8] utils: update-mojo.sh: Properly\n\tremove old sources","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> The update-mojo.sh script starts by removing all sources before copying\n> the new files from chromium. A bug in the 'rm' command makes the removal\n> a no-op: the glob pattern is quoted, which attempts to remove a file\n> name '*' in the tools directory, not all files in the directory. Fix it\n> by removing the whole utils/ipc/mojo/ directory.\n>\n> While at it, also remove the utils/ipc/tools/ directory that contains\n> imported sources.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  utils/update-mojo.sh | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n>\n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> index fcbc81e70529..967d139a3f70 100755\n> --- a/utils/update-mojo.sh\n> +++ b/utils/update-mojo.sh\n> @@ -30,14 +30,18 @@ if [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n>  \texit 1\n>  fi\n>  \n> +# Remove the previously imported files.\n> +rm -rf \"${ipc_dir}/mojo/\"\n> +rm -rf \"${ipc_dir}/tools/\"\n> +\n>  # Copy the diagnosis file\n> +mkdir -p \"${ipc_dir}/tools/diagnosis\"\n>  cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n>  \n>  # Copy the rest of mojo\n> +mkdir -p \"${ipc_dir}/mojo/public\"\n>  cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n>  \n> -rm -rf \"${ipc_dir}/mojo/public/tools/*\"\n> -\n>  (\n>  \tcd \"${chromium_dir}\" || exit\n>  \tfind ./mojo/public/tools -type f \\","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 8E6C4BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Jan 2024 10:06:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE98862B41;\n\tFri,  5 Jan 2024 11:06:56 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A17B161D7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Jan 2024 11:06:54 +0100 (CET)","from mail-wr1-f72.google.com (mail-wr1-f72.google.com\n\t[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-596-hX7BNOuJM5ShJjTWHUS0ug-1; Fri, 05 Jan 2024 05:06:51 -0500","by mail-wr1-f72.google.com with SMTP id\n\tffacd0b85a97d-336992b0f37so873198f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Jan 2024 02:06:51 -0800 (PST)","from nuthatch (ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\ts7-20020a5d6a87000000b0033680f7be5fsm1085503wru.87.2024.01.05.02.06.49\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 05 Jan 2024 02:06:49 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704449216;\n\tbh=/Be/03SJHk4WKZSdw6NLX6elFw+Wq6ZimJkqHu2KQsk=;\n\th=To:In-Reply-To:References:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=iYGcjw0JNDrjthZdTfyfcKgSImB9W2F0Wbbnin/1mA0QetFSWNVEbOPKGidVKsxUy\n\tTGkshuCp+jJUEgZwKXdR3XDZiDlC5Vu4O+Q7JOvF71B5sJ2RRmQvPXVbDVLZQ6i2Wi\n\tgxe+GimD5FIrxeNuGANbprllkS0jpc+6dpsjeNWaIC5zcD/An9ccUtS8uoI8IlXCH/\n\tsB1/TvODqMXalIvIajtjIQUAXXxMXBMG/oShhFk1E4/Zjh5igGgI/PN19IxD3dl1uD\n\tokehdYtY8XSttJDKrjAHnxpekYDCcUd4GihqWMShmLXkskyBqfF5r4CbPbaORigORX\n\t5MUNrbMucTwlg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1704449213;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=A7hjNp/h2h3572/StYqaBAUDUt7rGvaMzKpnfeE69gk=;\n\tb=McXEhY6VoyAoJJoF4mqCA/ipJCT73LQ+63WZRALizEgmw4a1YSxA8gnLIOtjN+YR77pLUs\n\t4RMeqWrpAhqlLUyUyI0i30/RC0Aj0Sx1+SOugopN7I4mnPRWJaqT+m/YjnyR1L8IMNH5cN\n\tIgWKzlKWgHLeN7Ez+Wgc8ape4mKr0mc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"McXEhY6V\"; \n\tdkim-atps=neutral","X-MC-Unique":"hX7BNOuJM5ShJjTWHUS0ug-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1704449211; x=1705054011;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=A7hjNp/h2h3572/StYqaBAUDUt7rGvaMzKpnfeE69gk=;\n\tb=B04pS0PFsfSosERqlLXJecU2Y2tbehN1cQpEpkfG1838IHmSPQHoZwiqjdW3RJPtBK\n\t3nFT0shzp99ruPE8kw9S6dDu4jIzQGgO/hz0okybWXvaJimXFFXIEEC9hMUaxi212kft\n\t9O0aCcVkJ/ELfdq1xyGC+dFlMMBS5A5q5WFypALwrUQuhSCYxVKRENxZqzRBxXm3+VSb\n\tQaPjPlBRflMyEPSaqq9jWba72RhOCsbD2ym9qUBRzHfE6YV0McqVmsAY4xyu1QoQYsX5\n\t9aYdWuAN1LLny8UsQIuQ9nrGAmu6zGbpkMz16ktGuOd3UIwiP06zfwGTO4xn0N3dl6mr\n\tLK1A==","X-Gm-Message-State":"AOJu0Yx3LnsLEIfcWS5C0EmQSHGYVqol5+wj0FjT3kbuAsR9YMbmgX64\n\tFtGF2fpQ5DMsZMz1pLb6TA5XtuZqEmSOqJv1K1xVD8zjeX/oMoxbdVAeaeVxBC+3wS8emhDZJ/H\n\tA/U2wdaV54gwdJWAcsoHN4xFOL1kFQcpIjMiRTJJp+A==","X-Received":["by 2002:a05:6000:1b85:b0:333:533d:9ce2 with SMTP id\n\tr5-20020a0560001b8500b00333533d9ce2mr867255wru.82.1704449210854; \n\tFri, 05 Jan 2024 02:06:50 -0800 (PST)","by 2002:a05:6000:1b85:b0:333:533d:9ce2 with SMTP id\n\tr5-20020a0560001b8500b00333533d9ce2mr867247wru.82.1704449210556; \n\tFri, 05 Jan 2024 02:06:50 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IF8qK+VB2K1Lqt6D9XCicU5TuREjI3EUn6ZnU6uWTYqBr/dJspGZuws/jilW/xFNc4+6Hi02A==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20240104151548.2589-2-laurent.pinchart@ideasonboard.com>\n\t(Laurent Pinchart's message of \"Thu, 4 Jan 2024 17:15:41 +0200\")","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-2-laurent.pinchart@ideasonboard.com>","Date":"Fri, 05 Jan 2024 11:06:49 +0100","Message-ID":"<87mstkum9y.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Subject":"Re: [libcamera-devel] [PATCH 1/8] utils: update-mojo.sh: Properly\n\tremove old sources","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>","From":"Milan Zamazal via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28401,"web_url":"https://patchwork.libcamera.org/comment/28401/","msgid":"<170480212965.3044059.6835788762928084623@ping.linuxembedded.co.uk>","date":"2024-01-09T12:08:49","subject":"Re: [libcamera-devel] [PATCH 1/8] utils: update-mojo.sh: Properly\n\tremove old sources","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:41)\n> The update-mojo.sh script starts by removing all sources before copying\n> the new files from chromium. A bug in the 'rm' command makes the removal\n> a no-op: the glob pattern is quoted, which attempts to remove a file\n> name '*' in the tools directory, not all files in the directory. Fix it\n> by removing the whole utils/ipc/mojo/ directory.\n> \n> While at it, also remove the utils/ipc/tools/ directory that contains\n> imported sources.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  utils/update-mojo.sh | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n> \n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> index fcbc81e70529..967d139a3f70 100755\n> --- a/utils/update-mojo.sh\n> +++ b/utils/update-mojo.sh\n> @@ -30,14 +30,18 @@ if [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n>         exit 1\n>  fi\n>  \n> +# Remove the previously imported files.\n> +rm -rf \"${ipc_dir}/mojo/\"\n> +rm -rf \"${ipc_dir}/tools/\"\n> +\n>  # Copy the diagnosis file\n> +mkdir -p \"${ipc_dir}/tools/diagnosis\"\n>  cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n>  \n>  # Copy the rest of mojo\n> +mkdir -p \"${ipc_dir}/mojo/public\"\n>  cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n>  \n> -rm -rf \"${ipc_dir}/mojo/public/tools/*\"\n> -\n>  (\n>         cd \"${chromium_dir}\" || exit\n>         find ./mojo/public/tools -type f \\\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 8237DC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 12:08:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD96662B41;\n\tTue,  9 Jan 2024 13:08:53 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C1E561D7B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 13:08:52 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66700552;\n\tTue,  9 Jan 2024 13:07:48 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704802133;\n\tbh=736kc7HpwNOBmMe+KVNjzMDY27NV8gSQ0u/X6Nmhavc=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=WDxteYhGoPF4QP2AjJbTdHs2urdEdjPaREpc/F8Ob4pbTsjZqiWkfmm0pB8K6qKPS\n\tUE3Q2RTUayeVRQZz4/iSs/ZZq8fNN3aQ8/AImvG1qLDTrrZ3NQk4f8QqSyS9dpg94m\n\texU0lD2S0q4XBK9w5o7fGVOn0Re4wIJp+ROWEkYa5DRs3qKjc0HzyqRdJ3qP/tC/Qe\n\tSWVKTG4HZ2rheUcDfSy4VCl8Guuklgiw0t1WKk+EwvFqUNsy8/JbF8tKsZoGP6HXDz\n\tOnQkDwIDN6JGSoA+qLO8cpjCXJC1tTPBmxP9vhxWR3oi5PpLZ+pjtz3SZKi/KloOrN\n\tCu34PwgCAA1lQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704802068;\n\tbh=736kc7HpwNOBmMe+KVNjzMDY27NV8gSQ0u/X6Nmhavc=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=fG0Ty6aOPco0VtV1f+iBMZMMzmBOfeUSNP+swoLwLXO2fhElXAnBuPBLQJpVox1GS\n\tkjlKBNuEx/+5qQYuh/6z8diFYVNmPw0GFKVp3FCUgfvjX/hRyCv7po+e1inYGK9HCv\n\trJfceS+nUUjZJ4cVRGutIZe90HInCMTeKkWbnYSc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"fG0Ty6aO\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240104151548.2589-2-laurent.pinchart@ideasonboard.com>","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-2-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 09 Jan 2024 12:08:49 +0000","Message-ID":"<170480212965.3044059.6835788762928084623@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 1/8] utils: update-mojo.sh: Properly\n\tremove old sources","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]