Hi Paul

As that opinion, I will use the patch from Debian/Ubuntu.

Zheng


________________________________
From: Paul Barker
Sent: Thursday, June 04, 2026 0:19
To: Zheng, Ruoqin/郑 若钦; Richard Purdie; [email protected]
Subject: Re: [OE-core][PATCH] vim-tiny: bugfix lack of defaults.vim

On Tue, 2026-06-02 at 07:02 +0000, zhengruoqin via
lists.openembedded.org wrote:
> Hi Richard
>
> In this mail, I would like to summarize the solutions of Ubuntu and Fedora 
> for this issue.
>
> Fedora : Put defaults.vim file in RDepends vim-data.
> https://src.fedoraproject.org/fork/vondruch/rpms/vim/blob/f40/f/vim.spec

That link is to a fork, and to an old version for Fedora 40.
https://src.fedoraproject.org/rpms/vim/blob/rawhide/f/vim.spec is a
better link.

That aside, Fedora doesn't have a vim-tiny package, so what they do is
irrelevant.

>
> Ubuntu: Make a patch to skip "source_defaults" error.
> https://archive.ubuntu.com/ubuntu/pool/main/v/vim/vim_8.2.3995-1ubuntu2.30.debian.tar.xz
> Patch file: 
> patches/debian/Support-sourcing-a-vimrc.tiny-when-Vim-is-invoked-as-vi.patch
> Modify file: vim-8.2.3995/src/main.c
>
> The  "parmp->vi_mode" is TRUE, so the "emsg(e_failed_to_source_defaults);" 
> will be skipped.
>
> 3197 #ifdef USR_EXRC_FILE2
> 3198                 && do_source((char_u *)USR_EXRC_FILE2, FALSE,
> 3199                                                        DOSO_NONE, NULL) 
> == FAIL
> 3200 #endif
> 3201 #if defined(SYS_TINYRC_FILE) && defined(TINY_VIMRC)
> 3202                 && !parmp->vi_mode
> 3203 #endif
> 3204                 && !has_dash_c_arg)
> 3205             {
> 3206                 // When no .vimrc file was found: source defaults.vim.
> 3207                 if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, 
> DOSO_NONE,
> 3208                                                                  NULL) 
> == FAIL)
> 3209                     emsg(e_failed_to_source_defaults);
> 3210             }
> 3211         }
>
>
> I think the Fedora's solution slightly simpler and easier to maintain, while 
> Ubuntu's solution may require further maintaining for this special patch.
>
> What do you think about it?

If we offer vim-tiny, it should actually be tiny. Building vim-tiny
should also not depend on building the full vim recipe.

We can't ship defaults.vim in multiple packages, and should not be
installing configuration files into user home directories. So the best
solution probably is to copy over this patch from Debian/Ubuntu.

Thanks,

--
Paul Barker

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#238155): 
https://lists.openembedded.org/g/openembedded-core/message/238155
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]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to