[libcamera-devel,5/8] utils: update-mojo.sh: Commit the mojo update
diff mbox series

Message ID 20240104151548.2589-6-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera: Update mojo and mojo updater
Related show

Commit Message

Laurent Pinchart Jan. 4, 2024, 3:15 p.m. UTC
Commit the mojo update with a standardized commit message. As mojo is
imported as-is without local modifications, this simplifies usage of the
update script.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/update-mojo.sh | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Comments

Milan Zamazal Jan. 5, 2024, 10:09 a.m. UTC | #1
Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:

> Commit the mojo update with a standardized commit message. As mojo is
> imported as-is without local modifications, this simplifies usage of the
> update script.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  utils/update-mojo.sh | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
> index 25a280e04331..bb0f078e5b3f 100755
> --- a/utils/update-mojo.sh
> +++ b/utils/update-mojo.sh
> @@ -72,9 +72,17 @@ EOF
>  echo "$readme" > utils/ipc/mojo/README
>  echo "$readme" > utils/ipc/tools/README
>  
> -cat <<EOF
> -------------------------------------------------------------
> -mojo updated. Please review and up-port local changes before
> -committing.
> -------------------------------------------------------------
> -EOF
> +# Commit the update.
> +git add utils/ipc/mojo/
> +git add utils/ipc/tools/
> +
> +echo "utils: ipc: Update mojo
> +
> +Update mojo from commit
> +
> +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
> +
> +from the Chromium repository.
> +
> +The update-mojo.sh script was used for this update." | \
> +git commit -n -s -F -

Why `-n'?
Laurent Pinchart Jan. 5, 2024, 10:41 a.m. UTC | #2
On Fri, Jan 05, 2024 at 11:09:22AM +0100, Milan Zamazal wrote:
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
> 
> > Commit the mojo update with a standardized commit message. As mojo is
> > imported as-is without local modifications, this simplifies usage of the
> > update script.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  utils/update-mojo.sh | 20 ++++++++++++++------
> >  1 file changed, 14 insertions(+), 6 deletions(-)
> >
> > diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
> > index 25a280e04331..bb0f078e5b3f 100755
> > --- a/utils/update-mojo.sh
> > +++ b/utils/update-mojo.sh
> > @@ -72,9 +72,17 @@ EOF
> >  echo "$readme" > utils/ipc/mojo/README
> >  echo "$readme" > utils/ipc/tools/README
> >  
> > -cat <<EOF
> > -------------------------------------------------------------
> > -mojo updated. Please review and up-port local changes before
> > -committing.
> > -------------------------------------------------------------
> > -EOF
> > +# Commit the update.
> > +git add utils/ipc/mojo/
> > +git add utils/ipc/tools/
> > +
> > +echo "utils: ipc: Update mojo
> > +
> > +Update mojo from commit
> > +
> > +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
> > +
> > +from the Chromium repository.
> > +
> > +The update-mojo.sh script was used for this update." | \
> > +git commit -n -s -F -
> 
> Why `-n'?

Because mojo doesn't comply with the Python coding style enforced by our
checkstyle.py. If someone runs checkstyle.py as a pre-commit hook, the
commit will fail.
Milan Zamazal Jan. 5, 2024, 10:54 a.m. UTC | #3
Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:

> On Fri, Jan 05, 2024 at 11:09:22AM +0100, Milan Zamazal wrote:
>> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
>> 
>
>> > Commit the mojo update with a standardized commit message. As mojo is
>> > imported as-is without local modifications, this simplifies usage of the
>> > update script.
>> >
>> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> > ---
>> >  utils/update-mojo.sh | 20 ++++++++++++++------
>> >  1 file changed, 14 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
>> > index 25a280e04331..bb0f078e5b3f 100755
>> > --- a/utils/update-mojo.sh
>> > +++ b/utils/update-mojo.sh
>> > @@ -72,9 +72,17 @@ EOF
>> >  echo "$readme" > utils/ipc/mojo/README
>> >  echo "$readme" > utils/ipc/tools/README
>> >  
>> > -cat <<EOF
>> > -------------------------------------------------------------
>> > -mojo updated. Please review and up-port local changes before
>> > -committing.
>> > -------------------------------------------------------------
>> > -EOF
>> > +# Commit the update.
>> > +git add utils/ipc/mojo/
>> > +git add utils/ipc/tools/
>> > +
>> > +echo "utils: ipc: Update mojo
>> > +
>> > +Update mojo from commit
>> > +
>> > +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
>> > +
>> > +from the Chromium repository.
>> > +
>> > +The update-mojo.sh script was used for this update." | \
>> > +git commit -n -s -F -
>> 
>> Why `-n'?
>
> Because mojo doesn't comply with the Python coding style enforced by our
> checkstyle.py. If someone runs checkstyle.py as a pre-commit hook, the
> commit will fail.

I see, OK.  Maybe worth mentioning this somewhere?  Anyway:

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Kieran Bingham Jan. 9, 2024, 12:11 p.m. UTC | #4
Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:45)
> Commit the mojo update with a standardized commit message. As mojo is
> imported as-is without local modifications, this simplifies usage of the
> update script.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  utils/update-mojo.sh | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
> index 25a280e04331..bb0f078e5b3f 100755
> --- a/utils/update-mojo.sh
> +++ b/utils/update-mojo.sh
> @@ -72,9 +72,17 @@ EOF
>  echo "$readme" > utils/ipc/mojo/README
>  echo "$readme" > utils/ipc/tools/README
>  
> -cat <<EOF
> -------------------------------------------------------------
> -mojo updated. Please review and up-port local changes before
> -committing.
> -------------------------------------------------------------
> -EOF
> +# Commit the update.
> +git add utils/ipc/mojo/
> +git add utils/ipc/tools/
> +
> +echo "utils: ipc: Update mojo
> +
> +Update mojo from commit
> +
> +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
> +
> +from the Chromium repository.
> +
> +The update-mojo.sh script was used for this update." | \
> +git commit -n -s -F -
> -- 
> Regards,
> 
> Laurent Pinchart
>
Laurent Pinchart Jan. 9, 2024, 12:15 p.m. UTC | #5
On Fri, Jan 05, 2024 at 11:54:25AM +0100, Milan Zamazal wrote:
> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
> 
> > On Fri, Jan 05, 2024 at 11:09:22AM +0100, Milan Zamazal wrote:
> >> Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:
> >> 
> >
> >> > Commit the mojo update with a standardized commit message. As mojo is
> >> > imported as-is without local modifications, this simplifies usage of the
> >> > update script.
> >> >
> >> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >> > ---
> >> >  utils/update-mojo.sh | 20 ++++++++++++++------
> >> >  1 file changed, 14 insertions(+), 6 deletions(-)
> >> >
> >> > diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
> >> > index 25a280e04331..bb0f078e5b3f 100755
> >> > --- a/utils/update-mojo.sh
> >> > +++ b/utils/update-mojo.sh
> >> > @@ -72,9 +72,17 @@ EOF
> >> >  echo "$readme" > utils/ipc/mojo/README
> >> >  echo "$readme" > utils/ipc/tools/README
> >> >  
> >> > -cat <<EOF
> >> > -------------------------------------------------------------
> >> > -mojo updated. Please review and up-port local changes before
> >> > -committing.
> >> > -------------------------------------------------------------
> >> > -EOF
> >> > +# Commit the update.
> >> > +git add utils/ipc/mojo/
> >> > +git add utils/ipc/tools/
> >> > +
> >> > +echo "utils: ipc: Update mojo
> >> > +
> >> > +Update mojo from commit
> >> > +
> >> > +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
> >> > +
> >> > +from the Chromium repository.
> >> > +
> >> > +The update-mojo.sh script was used for this update." | \
> >> > +git commit -n -s -F -
> >> 
> >> Why `-n'?
> >
> > Because mojo doesn't comply with the Python coding style enforced by our
> > checkstyle.py. If someone runs checkstyle.py as a pre-commit hook, the
> > commit will fail.
> 
> I see, OK.  Maybe worth mentioning this somewhere?  Anyway:

I'll update the above comment as follows:

# Commit the update. Use 'git commit -n' to avoid checkstyle pre-commit hook
# failures, as mojo doesn't comply with the Python coding style enforced by
# checkstyle.py.

> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Khem Raj Jan. 9, 2024, 3:20 p.m. UTC | #6
On Tue, Jan 9, 2024 at 4:11 AM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
>
> Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:45)
> > Commit the mojo update with a standardized commit message. As mojo is
> > imported as-is without local modifications, this simplifies usage of the
> > update script.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


lgtm
Reviewed-by: Khem Raj <raj.khem@gmail.com>


>
> > ---
> >  utils/update-mojo.sh | 20 ++++++++++++++------
> >  1 file changed, 14 insertions(+), 6 deletions(-)
> >
> > diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
> > index 25a280e04331..bb0f078e5b3f 100755
> > --- a/utils/update-mojo.sh
> > +++ b/utils/update-mojo.sh
> > @@ -72,9 +72,17 @@ EOF
> >  echo "$readme" > utils/ipc/mojo/README
> >  echo "$readme" > utils/ipc/tools/README
> >
> > -cat <<EOF
> > -------------------------------------------------------------
> > -mojo updated. Please review and up-port local changes before
> > -committing.
> > -------------------------------------------------------------
> > -EOF
> > +# Commit the update.
> > +git add utils/ipc/mojo/
> > +git add utils/ipc/tools/
> > +
> > +echo "utils: ipc: Update mojo
> > +
> > +Update mojo from commit
> > +
> > +$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
> > +
> > +from the Chromium repository.
> > +
> > +The update-mojo.sh script was used for this update." | \
> > +git commit -n -s -F -
> > --
> > Regards,
> >
> > Laurent Pinchart
> >

Patch
diff mbox series

diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh
index 25a280e04331..bb0f078e5b3f 100755
--- a/utils/update-mojo.sh
+++ b/utils/update-mojo.sh
@@ -72,9 +72,17 @@  EOF
 echo "$readme" > utils/ipc/mojo/README
 echo "$readme" > utils/ipc/tools/README
 
-cat <<EOF
-------------------------------------------------------------
-mojo updated. Please review and up-port local changes before
-committing.
-------------------------------------------------------------
-EOF
+# Commit the update.
+git add utils/ipc/mojo/
+git add utils/ipc/tools/
+
+echo "utils: ipc: Update mojo
+
+Update mojo from commit
+
+$(git -C "${chromium_dir}" show --pretty='%H "%s"' --no-patch)
+
+from the Chromium repository.
+
+The update-mojo.sh script was used for this update." | \
+git commit -n -s -F -