From c33f9a2871f5dc2b5b6abcf28f81411b3400a924 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 23 Dec 2025 19:10:08 +0100 Subject: [PATCH] package/vim: fix reinstallation While not very common, it is nice when package re-installation works. Unfortunately the "installlinks" target of vim installs links with "ln -s", causing a package reinstallation to fail with: cd /home/thomas/buildroot/br/output-all/target/usr/bin; ln -s vim ex cd /home/thomas/buildroot/br/output-all/target/usr/bin; ln -s vim view cd /home/thomas/buildroot/br/output-all/target/usr/bin; ln -s vim rvim cd /home/thomas/buildroot/br/output-all/target/usr/bin; ln -s vim rview cd /home/thomas/buildroot/br/output-all/target/usr/bin; ln -s vim vimdiff ln: failed to create symbolic link 'ex': File exists ln: failed to create symbolic link 'view': File exists make[2]: *** [Makefile:2749: /home/thomas/buildroot/br/output-all/target/usr/bin/ex] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile:2752: /home/thomas/buildroot/br/output-all/target/usr/bin/view] Error 1 ln: failed to create symbolic link 'rvim': File exists ln: failed to create symbolic link 'rview': File exists To fix this, we remove the target links before proceeding with the installation. Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 67e84345c156170fa01103289f1d255a74ad830d) Signed-off-by: Thomas Perale --- package/vim/vim.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/vim/vim.mk b/package/vim/vim.mk index 4297bdd198..36015c6085 100644 --- a/package/vim/vim.mk +++ b/package/vim/vim.mk @@ -47,6 +47,7 @@ VIM_CONF_OPTS += --disable-selinux endif define VIM_INSTALL_TARGET_CMDS + $(RM) -f $(TARGET_DIR)/usr/bin/{ex,view,rvim,rview,vimdiff} cd $(@D)/src; \ $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \ $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) installpack; \