diff mbox series

[2/3] support/scripts: don't require gawk to generate glibc gconv modules

Message ID 1138_1665746311_63494587_1138_437_1_82ab2cc49c43374ceb22a1fdd6bc5e4c72d29df2.1665746266.git.yann.morin@orange.com
State Accepted
Headers show
Series [1/3] Makefile: really generate glibc locales in parallel | expand

Commit Message

Yann E. MORIN Oct. 14, 2022, 11:18 a.m. UTC
When a subset of the glibc gconv modules installed, we eed to generate a
trimmed-down list of available modules. We currently use gawk for that.

However, we are not using any GNU extension in that awk script, and it
happens to work as expected when using mawk (which has no GNU
extension).

Commit 11c1076db9a5 (toolchain: add option to copy the gconv libraries)
did not explain why it used gawk explicitly, and given the age for that
commit, we doubt we'd be able to have the involved participants recall
anything from that period...

Besides, gawk is not a requirement for Buildroot.

Switch over to using plain awk.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
---
 support/scripts/expunge-gconv-modules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yann E. MORIN Oct. 21, 2022, 7:08 p.m. UTC | #1
Yann, All,

On 2022-10-14 13:18 +0200, yann.morin@orange.com spake thusly:
> When a subset of the glibc gconv modules installed, we eed to generate a

*are installed, we need

> trimmed-down list of available modules. We currently use gawk for that.
> 
> However, we are not using any GNU extension in that awk script, and it
> happens to work as expected when using mawk (which has no GNU
> extension).
> 
> Commit 11c1076db9a5 (toolchain: add option to copy the gconv libraries)
> did not explain why it used gawk explicitly, and given the age for that
> commit, we doubt we'd be able to have the involved participants recall
> anything from that period...
> 
> Besides, gawk is not a requirement for Buildroot.
> 
> Switch over to using plain awk.
> 
> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>

Applied to master with the typoes fixed, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/scripts/expunge-gconv-modules | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/scripts/expunge-gconv-modules b/support/scripts/expunge-gconv-modules
> index 03012c1ce3..bc60fc0ce4 100755
> --- a/support/scripts/expunge-gconv-modules
> +++ b/support/scripts/expunge-gconv-modules
> @@ -19,7 +19,7 @@
>  # we handle each with slightly different code, since the second never has
>  # associated aliases.
>  
> -gawk -v files="${1}" '
> +awk -v files="${2}" '
>  $1 == "alias" {
>      aliases[$3] = aliases[$3] " " $2;
>  }
> -- 
> 2.25.1
> 
> 
> _________________________________________________________________________________________________________________________
> 
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
> 
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Peter Korsgaard Nov. 4, 2022, 7:40 a.m. UTC | #2
>>>>>   <yann.morin@orange.com> writes:

 > When a subset of the glibc gconv modules installed, we eed to generate a
 > trimmed-down list of available modules. We currently use gawk for that.

 > However, we are not using any GNU extension in that awk script, and it
 > happens to work as expected when using mawk (which has no GNU
 > extension).

 > Commit 11c1076db9a5 (toolchain: add option to copy the gconv libraries)
 > did not explain why it used gawk explicitly, and given the age for that
 > commit, we doubt we'd be able to have the involved participants recall
 > anything from that period...

 > Besides, gawk is not a requirement for Buildroot.

 > Switch over to using plain awk.

 > Signed-off-by: Yann E. MORIN <yann.morin@orange.com>

Committed to 2022.08.x and 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/support/scripts/expunge-gconv-modules b/support/scripts/expunge-gconv-modules
index 03012c1ce3..bc60fc0ce4 100755
--- a/support/scripts/expunge-gconv-modules
+++ b/support/scripts/expunge-gconv-modules
@@ -19,7 +19,7 @@ 
 # we handle each with slightly different code, since the second never has
 # associated aliases.
 
-gawk -v files="${1}" '
+awk -v files="${2}" '
 $1 == "alias" {
     aliases[$3] = aliases[$3] " " $2;
 }