commit: 84f989fbd929cacc1668e52b370639aae08942fa Author: Kerin Millar <kfm <AT> plushkava <DOT> net> AuthorDate: Thu Jul 28 23:14:12 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jul 29 02:04:03 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84f989fb
app-editors/vim-core: Don't try to assign to g:skip_defaults_vim for minimal builds A recent adjustment to some of the vim-core ebuilds accidentally removed a sed command that removes the following line from /etc/vim/vimrc, provided that the "minimal" USE flag was in effect. let g:skip_defaults_vim = 1 The reason for doing so is that this assignment raises an error in the case of a minimal build. Rather than re-instate the missing sed commands, let's update the vimrc template so as to employ a feature guard, relying on the fact that minimal builds lack the +eval feature. Fixes: 5e9a3926fd3e0e573f529fd6aefebba53e082f4a Signed-off-by: Kerin Millar <kfm <AT> plushkava.net> Signed-off-by: Sam James <sam <AT> gentoo.org> app-editors/vim-core/files/{vimrc-r5 => vimrc-r6} | 7 +++++-- .../{vim-core-8.2.4586.ebuild => vim-core-8.2.4586-r1.ebuild} | 5 +---- .../{vim-core-8.2.5066-r2.ebuild => vim-core-8.2.5066-r3.ebuild} | 2 +- .../{vim-core-9.0.0049-r1.ebuild => vim-core-9.0.0049-r2.ebuild} | 2 +- app-editors/vim-core/vim-core-9999.ebuild | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app-editors/vim-core/files/vimrc-r5 b/app-editors/vim-core/files/vimrc-r6 similarity index 97% rename from app-editors/vim-core/files/vimrc-r5 rename to app-editors/vim-core/files/vimrc-r6 index 2409822e628c..0197f057d233 100644 --- a/app-editors/vim-core/files/vimrc-r5 +++ b/app-editors/vim-core/files/vimrc-r6 @@ -190,8 +190,11 @@ endif " has("autocmd") " }}} " We don't want VIM to load their own built-in defaults, preferring ours here -" instead: -let g:skip_defaults_vim = 1 +" instead. This option cannot apply to minimal builds, so it is guarded by a +" test that's guaranteed to fail for those, owing to the lack of +eval. +if 1 + let g:skip_defaults_vim = 1 +endif " Enable Omni completion when opening a file only if a specific plugin does " not already exist for that filetype. This allows Omni completion diff --git a/app-editors/vim-core/vim-core-8.2.4586.ebuild b/app-editors/vim-core/vim-core-8.2.4586-r1.ebuild similarity index 97% rename from app-editors/vim-core/vim-core-8.2.4586.ebuild rename to app-editors/vim-core/vim-core-8.2.4586-r1.ebuild index ab6f035d555a..9082086dac7b 100644 --- a/app-editors/vim-core/vim-core-8.2.4586.ebuild +++ b/app-editors/vim-core/vim-core-8.2.4586-r1.ebuild @@ -182,7 +182,7 @@ src_install() { # default vimrc is installed by vim-core since it applies to # both vim and gvim insinto /etc/vim/ - newins "${FILESDIR}"/vimrc-r5 vimrc + newins "${FILESDIR}"/vimrc-r6 vimrc eprefixify "${ED}"/etc/vim/vimrc if use minimal; then @@ -203,9 +203,6 @@ src_install() { printf '%s\0' "${f}" fi done | xargs -0 rm -f || die - - # Delete skip_defaults_vim config not supported by vim[minimal] - sed -i '/skip_defaults_vim/d' "${ED}"/etc/vim/vimrc || die fi newbashcomp "${FILESDIR}"/xxd-completion xxd diff --git a/app-editors/vim-core/vim-core-8.2.5066-r2.ebuild b/app-editors/vim-core/vim-core-8.2.5066-r3.ebuild similarity index 99% rename from app-editors/vim-core/vim-core-8.2.5066-r2.ebuild rename to app-editors/vim-core/vim-core-8.2.5066-r3.ebuild index c11d467f2a5a..80f292882ea4 100644 --- a/app-editors/vim-core/vim-core-8.2.5066-r2.ebuild +++ b/app-editors/vim-core/vim-core-8.2.5066-r3.ebuild @@ -183,7 +183,7 @@ src_install() { # default vimrc is installed by vim-core since it applies to # both vim and gvim insinto /etc/vim/ - newins "${FILESDIR}"/vimrc-r5 vimrc + newins "${FILESDIR}"/vimrc-r6 vimrc eprefixify "${ED}"/etc/vim/vimrc if use minimal; then diff --git a/app-editors/vim-core/vim-core-9.0.0049-r1.ebuild b/app-editors/vim-core/vim-core-9.0.0049-r2.ebuild similarity index 99% rename from app-editors/vim-core/vim-core-9.0.0049-r1.ebuild rename to app-editors/vim-core/vim-core-9.0.0049-r2.ebuild index 555b9e91b8db..17a02fa52a3c 100644 --- a/app-editors/vim-core/vim-core-9.0.0049-r1.ebuild +++ b/app-editors/vim-core/vim-core-9.0.0049-r2.ebuild @@ -179,7 +179,7 @@ src_install() { # default vimrc is installed by vim-core since it applies to # both vim and gvim insinto /etc/vim/ - newins "${FILESDIR}"/vimrc-r5 vimrc + newins "${FILESDIR}"/vimrc-r6 vimrc eprefixify "${ED}"/etc/vim/vimrc if use minimal; then diff --git a/app-editors/vim-core/vim-core-9999.ebuild b/app-editors/vim-core/vim-core-9999.ebuild index 555b9e91b8db..17a02fa52a3c 100644 --- a/app-editors/vim-core/vim-core-9999.ebuild +++ b/app-editors/vim-core/vim-core-9999.ebuild @@ -179,7 +179,7 @@ src_install() { # default vimrc is installed by vim-core since it applies to # both vim and gvim insinto /etc/vim/ - newins "${FILESDIR}"/vimrc-r5 vimrc + newins "${FILESDIR}"/vimrc-r6 vimrc eprefixify "${ED}"/etc/vim/vimrc if use minimal; then