qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour
@ 2023-07-20 15:30 Peter Maydell
  2023-07-20 16:04 ` Daniel P. Berrangé
  2023-07-21  9:11 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2023-07-20 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Daniel P. Berrangé

The POSIX definition of the 'read' utility requires that you
specify the variable name to set; omitting the name and
having it default to 'REPLY' is a bashism. If your system
sh is dash, then it will print an error message during build:

qemu/pc-bios/s390-ccw/../../scripts/git-submodule.sh: 106: read: arg count

Specify the variable name explicitly.

Fixes: fdb8fd8cb915647b ("git-submodule: allow partial update of .git-submodule-status")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 scripts/git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 335f7f5fdf8..bb1222c7727 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -103,7 +103,7 @@ update)
         check_updated $module || echo Updated "$module"
     done
 
-    (while read -r; do
+    (while read -r REPLY; do
         for module in $modules; do
             case $REPLY in
                 *" $module "*) continue 2 ;;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour
  2023-07-20 15:30 [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour Peter Maydell
@ 2023-07-20 16:04 ` Daniel P. Berrangé
  2023-07-21  9:11 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2023-07-20 16:04 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Paolo Bonzini

On Thu, Jul 20, 2023 at 04:30:38PM +0100, Peter Maydell wrote:
> The POSIX definition of the 'read' utility requires that you
> specify the variable name to set; omitting the name and
> having it default to 'REPLY' is a bashism. If your system
> sh is dash, then it will print an error message during build:
> 
> qemu/pc-bios/s390-ccw/../../scripts/git-submodule.sh: 106: read: arg count
> 
> Specify the variable name explicitly.
> 
> Fixes: fdb8fd8cb915647b ("git-submodule: allow partial update of .git-submodule-status")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  scripts/git-submodule.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour
  2023-07-20 15:30 [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour Peter Maydell
  2023-07-20 16:04 ` Daniel P. Berrangé
@ 2023-07-21  9:11 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-21  9:11 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Paolo Bonzini, Daniel P. Berrangé

On 20/7/23 17:30, Peter Maydell wrote:
> The POSIX definition of the 'read' utility requires that you
> specify the variable name to set; omitting the name and
> having it default to 'REPLY' is a bashism. If your system
> sh is dash, then it will print an error message during build:
> 
> qemu/pc-bios/s390-ccw/../../scripts/git-submodule.sh: 106: read: arg count
> 
> Specify the variable name explicitly.
> 
> Fixes: fdb8fd8cb915647b ("git-submodule: allow partial update of .git-submodule-status")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   scripts/git-submodule.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-21  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 15:30 [PATCH for-8.1] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour Peter Maydell
2023-07-20 16:04 ` Daniel P. Berrangé
2023-07-21  9:11 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).