Hi Richard
I also refer the solution of fedora
https://src.fedoraproject.org/fork/vondruch/rpms/vim/blob/f40/f/vim.spec
1.
Vim-minimal(vim-tiny) depends on vim-data.
2.vim-data provides defaults.vim file
Zheng
________________________________
From: Zheng, Ruoqin/郑 若钦 <[email protected]>
Sent: Tuesday, June 2, 2026 9:54
To: Richard Purdie <[email protected]>;
[email protected]
<[email protected]>
Subject: Re: [OE-core][PATCH] vim-tiny: bugfix lack of defaults.vim
Hi Richard
I also refer the solution of ubuntu
1. In ubuntu, vim.tiny depends on vim-common
https://packages.ubuntu.com/en/noble/vim-tiny
2. In vim-common, it includes vimrc needed by vim.tiny.
https://packages.ubuntu.com/en/noble/all/vim-common/filelist
3. Discussion about this issue of ubuntu
https://lists.snapcraft.io/archives/foundations-bugs/2022-April/472830.html
So I think add vim-common as RDEPENDS of vim.tiny is also a reasonable
solution.
Zheng
________________________________
From: [email protected]
<[email protected]> on behalf of zhengruoqin via
lists.openembedded.org <[email protected]>
Sent: Monday, June 1, 2026 10:04
To: Richard Purdie <[email protected]>;
[email protected]
<[email protected]>
Subject: Re: [OE-core][PATCH] vim-tiny: bugfix lack of defaults.vim
Hi Richard
To fix this issue, I also have another method. To touch empty .vimrc to
avoid "Failed to source defaults.vim" error
And the patch will like this
diff --git a/meta/recipes-support/vim/vim-tiny_9.2.bb
b/meta/recipes-support/vim/vim-tiny_9.2.bb
index e4c26d23f6..33cc481271 100644
--- a/meta/recipes-support/vim/vim-tiny_9.2.bb
+++ b/meta/recipes-support/vim/vim-tiny_9.2.bb
@@ -6,6 +6,15 @@ PACKAGECONFIG += "tiny"
do_install() {
install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
+
+ # Add ".vimrc" file to avoid "Failed to source defaults.vim" error
+ # For root user
+ touch ${D}/root/.vimrc
+
+ # For non-root user
+ install -d ${D}/etc/skel
+ touch ${D}/etc/skel/.vimrc
+
}
Is this method OK?
Zheng
________________________________
From: Richard Purdie <[email protected]>
Sent: Monday, June 1, 2026 1:26
To: Zheng, Ruoqin/郑 若钦 <[email protected]>;
[email protected]
<[email protected]>
Subject: Re: [OE-core][PATCH] vim-tiny: bugfix lack of defaults.vim
On Thu, 2026-05-28 at 10:06 +0800, zhengruoqin via lists.openembedded.org wrote:
> When vim-tiny was used in image, it lacks defaults.vim file which will cause
> following error
> root@qemux86-64:~# vi
> E1187: Failed to source defaults.vim
> Press ENTER or type command to continue
>
> So add vim-common as RDEPENDS to provide defaults.vim file to fix this issue.
>
> Signed-off-by: Zheng Ruoqin <[email protected]>
> ---
> meta/recipes-support/vim/vim-tiny_9.2.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-support/vim/vim-tiny_9.2.bb
> b/meta/recipes-support/vim/vim-tiny_9.2.bb
> index e4c26d23f6..b6ddded381 100644
> --- a/meta/recipes-support/vim/vim-tiny_9.2.bb
> +++ b/meta/recipes-support/vim/vim-tiny_9.2.bb
> @@ -8,5 +8,7 @@ do_install() {
> install -D -m 0755 ${S}/src/vim ${D}/${bindir}/vim.tiny
> }
>
> +RDEPENDS:${PN} += "vim-common"
> +
> ALTERNATIVE_PRIORITY = "90"
> ALTERNATIVE_TARGET = "${bindir}/vim.tiny"
Doesn't adding dependencies like this defeat the point of vim-tiny in the first
place?
Can we configure that out instead?
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#237999):
https://lists.openembedded.org/g/openembedded-core/message/237999
Mute This Topic: https://lists.openembedded.org/mt/119524274/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-