diff options
author | Sam James <sam@gentoo.org> | 2022-07-27 22:48:31 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-27 22:57:05 +0100 |
commit | 5e9a3926fd3e0e573f529fd6aefebba53e082f4a (patch) | |
tree | a189a8c66fa05077767d131a6bed4f47791b7c1f /app-editors/vim-core/vim-core-9999.ebuild | |
parent | app-antivirus/clamav: new upstream 0.104.4 (diff) | |
download | gentoo-5e9a3926fd3e0e573f529fd6aefebba53e082f4a.tar.gz gentoo-5e9a3926fd3e0e573f529fd6aefebba53e082f4a.tar.bz2 gentoo-5e9a3926fd3e0e573f529fd6aefebba53e082f4a.zip |
app-editors/vim-core: fix incorrect conditional use of extglob
bash-5.2 is stricter with this and upstream say this was never
supposed to work (and indeed may have done odd things at runtime
anyway).
We're going to have to avoid any conditional use of extglob
like this as the parser has no idea if we've enabled extglob
or not at the point it runs.
Fixes a sourcing error:
```
vim-core-9999.ebuild: line 195: syntax error near unexpected token `('
vim-core-9999.ebuild: line 195: ` ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )'
```
Thanks-to: tirnanog (mangled his suggestion in this commit)
Thanks-to: Ionen Wolkens <ionen@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-editors/vim-core/vim-core-9999.ebuild')
-rw-r--r-- | app-editors/vim-core/vim-core-9999.ebuild | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/app-editors/vim-core/vim-core-9999.ebuild b/app-editors/vim-core/vim-core-9999.ebuild index e808fd2a2495..555b9e91b8db 100644 --- a/app-editors/vim-core/vim-core-9999.ebuild +++ b/app-editors/vim-core/vim-core-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Please bump with app-editors/vim and app-editors/gvim VIM_VERSION="9.0" -inherit estack vim-doc flag-o-matic bash-completion-r1 prefix desktop xdg-utils +inherit vim-doc flag-o-matic bash-completion-r1 prefix desktop xdg-utils if [[ ${PV} == 9999* ]] ; then inherit git-r3 @@ -185,24 +185,21 @@ src_install() { if use minimal; then # To save space, install only a subset of the files. # Helps minimalize the livecd, bug 65144. - eshopts_push -s extglob - - rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed" - rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed" - rm -v "${ED}"/usr/bin/vimtutor || die "rm failed" - - local keep_colors="default" - ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim ) - - local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig" - # tinkering with the next line might make bad things happen ... - keep_syntax="${keep_syntax}|syntax|nosyntax|synload" - ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim ) - - # Delete skip_defaults_vim config not supported by vim[minimal] - sed -i '/skip_defaults_vim/d' "${ED}"/etc/vim/vimrc || die "sed failed" - - eshopts_pop + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die fi newbashcomp "${FILESDIR}"/xxd-completion xxd |