[Buildroot] [PATCH] vim: create a relative symlink for vi

Baruch Siach baruch at tkos.co.il
Fri Jul 13 07:06:20 UTC 2018


/bin/vi is created as a canonical symlink, which might be dangling when
the host doesn't have vim installed. This is not a problem by itself.
But since commit 50dc350c65f4 (package/busybox: update to 1.29.0) we use
noclobber install of busybox. The dangling symlink is interpreted as non
existing file, which breaks the noclobber install.

Fixes:
http://autobuild.buildroot.net/results/796/796107430db6545401d9926e84f19eaf2040b756/

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
Yann, in the general case we should probably not copy over a dangling
symlink. So maybe we need to account for that in the install.sh script
of busybox.
---
 package/vim/vim.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/vim/vim.mk b/package/vim/vim.mk
index dbf71c573f6c..4a8bbdad2e1e 100644
--- a/package/vim/vim.mk
+++ b/package/vim/vim.mk
@@ -64,7 +64,7 @@ endef
 
 # Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
 define VIM_INSTALL_VI_SYMLINK
-	ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi
+	ln -sf ../usr/bin/vim $(TARGET_DIR)/bin/vi
 endef
 VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
 
-- 
2.18.0




More information about the buildroot mailing list