* [Buildroot] [PATCH] vim: create a relative symlink for vi
@ 2018-07-13 7:06 Baruch Siach
2018-07-13 8:49 ` Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2018-07-13 7:06 UTC (permalink / raw)
To: buildroot
/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@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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] vim: create a relative symlink for vi
2018-07-13 7:06 [Buildroot] [PATCH] vim: create a relative symlink for vi Baruch Siach
@ 2018-07-13 8:49 ` Arnout Vandecappelle
2018-07-13 9:37 ` Baruch Siach
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2018-07-13 8:49 UTC (permalink / raw)
To: buildroot
On 13-07-18 09:06, Baruch Siach wrote:
> /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@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
Won't this break under BR2_ROOTFS_MERGED_USR?
That's a problem with relative symlinks in general: the .. may not point to the
directory you expect...
Regards,
Arnout
> endef
> VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] vim: create a relative symlink for vi
2018-07-13 8:49 ` Arnout Vandecappelle
@ 2018-07-13 9:37 ` Baruch Siach
0 siblings, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2018-07-13 9:37 UTC (permalink / raw)
To: buildroot
Hi Arnout,
Arnout Vandecappelle writes:
> On 13-07-18 09:06, Baruch Siach wrote:
>> /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@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
>
> Won't this break under BR2_ROOTFS_MERGED_USR?
>
> That's a problem with relative symlinks in general: the .. may not point to the
> directory you expect...
So the real fix requires a change to the busybox install.sh, right?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-13 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 7:06 [Buildroot] [PATCH] vim: create a relative symlink for vi Baruch Siach
2018-07-13 8:49 ` Arnout Vandecappelle
2018-07-13 9:37 ` Baruch Siach
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.