Skip to contentSkip to conversation

package/gawk: create awk symlink for host-gawk

PATCH New Hubert Lacote 3 participants 3 messages Jun 15, 2021 – Jul 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gawk: create awk symlink for host-gawk

From: Hubert Lacote <[email protected]>

This is to make sure that host packages that depend on host-gawk and that use awk end up using gawk, instead of the awk symlink installed on the host system.

On recent Debian-based distributions, awk is still symlinked to mawk [1].

[1] https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/1841654

---
 package/gawk/gawk.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/gawk/gawk.mk +6 -0
index 16906f6f93..ab7088e90e 100644
@@ -33,6 +33,12 @@ endif
 
 HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr
 
+define HOST_GAWK_CREATE_SYMLINK
+	ln -sf gawk $(HOST_DIR)/usr/bin/awk
+endef
+
+HOST_GAWK_POST_INSTALL_HOOKS += HOST_GAWK_CREATE_SYMLINK
+
 define GAWK_CREATE_SYMLINK
 	ln -sf gawk $(TARGET_DIR)/usr/bin/awk
 endef
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 package/gawk: create awk symlink for host-gawk

Hubert, All,

On 2021-06-15 16:03 +0200, Hubert Lacote spake thusly:

Quoted 22 lines

From: Hubert Lacote <[email protected]>

This is to make sure that host packages that depend on host-gawk and that use awk end up using gawk, instead of the awk symlink installed on the host system.

On recent Debian-based distributions, awk is still symlinked to mawk [1].

[1] https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/1841654

---
 package/gawk/gawk.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/gawk/gawk.mk +0 -0
index 16906f6f93..ab7088e90e 100644

package/gawk/gawk.mk endif · line 40

Quoted 8 lines
package/gawk/gawk.mk +5 -0
@@ -33,6 +33,12 @@ endif
 
 HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr
 
+define HOST_GAWK_CREATE_SYMLINK
+	ln -sf gawk $(HOST_DIR)/usr/bin/awk
+endef
+
+HOST_GAWK_POST_INSTALL_HOOKS += HOST_GAWK_CREATE_SYMLINK

Usually, we add the host-variant stuff after the target-variant stuff, so I moved that after the corresponding hook, below:

package/gawk/gawk.mk endif · line 44

Quoted 3 lines
package/gawk/gawk.mk +0 -0
 define GAWK_CREATE_SYMLINK
 	ln -sf gawk $(TARGET_DIR)/usr/bin/awk
 endef

Of course, I see that you inserted that next to the existing host-variant CONF_OPTS, and I can see the reasoning. Still, I found it odd for the host suff to be stuffed in the middle of the tarrget stuff...

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 7 lines
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/gawk: create awk symlink for host-gawk

In reply to Hubert Lacote
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Hubert" == Hubert Lacote <[email protected]> writes:

From: Hubert Lacote <[email protected]>
This is to make sure that host packages that depend on host-gawk and that use awk end up using gawk, instead of the awk symlink installed on the host system.

Quoted 7 lines

On recent Debian-based distributions, awk is still symlinked to mawk [1].

[1] https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/1841654

Committed to 2021.02.x and 2021.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard