diff mbox series

[v1,1/1] package/qemu: check if qemu-system is enabled when creating symlink

Message ID 20230301005456.250709-1-christian@paral.in
State Accepted
Headers show
Series [v1,1/1] package/qemu: check if qemu-system is enabled when creating symlink | expand

Commit Message

Christian Stewart March 1, 2023, 12:54 a.m. UTC
Commit c6b9cd9a11fe7fec6bfec2ddbd42c2851dba0011 added a symlink to qemu-system
as a post install hook. However, it does not check if qemu-system is actually
enabled with BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE.

Add the check to make sure we only create the symlink if that is enabled.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/qemu/qemu.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Korsgaard March 2, 2023, 10:18 p.m. UTC | #1
>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:

 > Commit c6b9cd9a11fe7fec6bfec2ddbd42c2851dba0011 added a symlink to qemu-system
 > as a post install hook. However, it does not check if qemu-system is actually
 > enabled with BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE.

 > Add the check to make sure we only create the symlink if that is enabled.

 > Signed-off-by: Christian Stewart <christian@paral.in>

Committed, thanks.
Peter Korsgaard March 15, 2023, 7:09 a.m. UTC | #2
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:
 >> Commit c6b9cd9a11fe7fec6bfec2ddbd42c2851dba0011 added a symlink to qemu-system
 >> as a post install hook. However, it does not check if qemu-system is actually
 >> enabled with BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE.

 >> Add the check to make sure we only create the symlink if that is enabled.

 >> Signed-off-by: Christian Stewart <christian@paral.in>

Committed to 2022.11.x, thanks.
diff mbox series

Patch

diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk
index 58b4ff10a5..cc8dc42a24 100644
--- a/package/qemu/qemu.mk
+++ b/package/qemu/qemu.mk
@@ -488,10 +488,12 @@  define HOST_QEMU_INSTALL_CMDS
 endef
 
 # install symlink to qemu-system
+ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
 define HOST_QEMU_POST_INSTALL_SYMLINK
 	ln -sf ./qemu-system-$(HOST_QEMU_ARCH) $(HOST_DIR)/bin/qemu-system
 endef
 HOST_QEMU_POST_INSTALL_HOOKS += HOST_QEMU_POST_INSTALL_SYMLINK
+endif
 
 $(eval $(host-generic-package))