#2 Mitigate rvim issue bz#1773723
Merged 2 months ago by praiskup. Opened 2 months ago by maage.
rpms/ maage/vim-syntastic rvim-1  into  master

@@ -0,0 +1,43 @@ 

+ # Upstream version bump removed

+ commit 39b35b23b952d620b8ec7cabb13110f586663837

+ Author: LCD 47 <lcd047@gmail.com>

+ Date:   Wed Nov 20 10:00:33 2019 +0200

+ 

+     Sanity check: syntastic can't run in rvim.

+ 

+ diff --git a/autoload/syntastic/util.vim b/autoload/syntastic/util.vim

+ index 8a17fe64..41b40e6a 100644

+ --- a/autoload/syntastic/util.vim

+ +++ b/autoload/syntastic/util.vim

+ @@ -42,6 +42,11 @@ function! syntastic#util#system(command) abort " {{{2

+      try

+          let out = system(a:command)

+      catch

+ +        if v:exception =~# '\m^Vim\%((\a\+)\)\=:\%(E145\|E484\|E684\)'

+ +            " XXX re-throwing unmodified v:exception triggers E608

+ +            throw substitute(v:exception, '.*:\(E145\|E484\|E684\).*', '\1', '')

+ +        endif

+ +

+          let crashed = 1

+          call syntastic#log#error('exception running system(' . string(a:command) . '): ' . v:exception)

+          if syntastic#util#isRunningWindows()

+ diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim

+ index d48a8d12..4a113eee 100644

+ --- a/plugin/syntastic.vim

+ +++ b/plugin/syntastic.vim

+ @@ -57,10 +57,13 @@ if s:_running_windows

+  elseif executable('uname')

+      try

+          let g:_SYNTASTIC_UNAME = split(syntastic#util#system('uname'), "\n")[0]

+ -    catch /\m^Vim\%((\a\+)\)\=:E484/

+ +    catch /\m^E145$/

+ +        call syntastic#log#error("can't run in rvim")

+ +        finish

+ +    catch /\m^E484$/

+          call syntastic#log#error("can't run external programs (misconfigured shell options?)")

+          finish

+ -    catch /\m^Vim\%((\a\+)\)\=:E684/

+ +    catch /\m^E684$/

+          let g:_SYNTASTIC_UNAME = 'Unknown'

+      endtry

+  else

file modified
+11 -6

@@ -6,7 +6,7 @@ 

  

  Name:           vim-%{upstream_name}

  Version:        3.10.0

- Release:        1%{?dist}

+ Release:        3%{?dist}

  Summary:        A vim plugins to check syntax for programming languages

  Summary(fr):    Une extension de vim vérifiant la syntaxe pour les langages de programmation

  

@@ -16,6 +16,7 @@ 

  Source1:        vim-syntastic.metainfo.xml

  

  Patch0:         vim-syntastic-3.9.0-python3-shebang.patch

+ Patch1:         vim-syntastic-3.10.0-5-rvim.patch

  

  BuildArch:      noarch

  Requires:       vim

@@ -229,10 +230,9 @@ 

  %install

  mkdir -p %{buildroot}%{_bindir}

  mkdir -p %{buildroot}%{vimfiles}/autoload

- mkdir -p %{buildroot}%{vimfiles}/doc

  

  cp      -rp       autoload/*                            %{buildroot}%{vimfiles}/autoload/

- install -p -m0644 doc/syntastic.txt                     %{buildroot}%{vimfiles}/doc/syntastic.txt

+ install -Dpm0644  doc/syntastic.txt                     %{buildroot}%{vimfiles}/doc/syntastic.txt

  cp      -rp       plugin/                               %{buildroot}%{vimfiles}/plugin

  cp      -rp       syntax_checkers/                      %{buildroot}%{vimfiles}/syntax_checkers

  

@@ -249,13 +249,12 @@ 

  # zpt.vim            -> no zptlint executable in repo

  

  # Install AppData.

- mkdir -p %{buildroot}%{appdata_dir}

- install -m 644 %{SOURCE1} %{buildroot}%{appdata_dir}

+ install -Dpm0644 %{SOURCE1} %{buildroot}%{appdata_dir}/vim-syntastic.metainfo.xml

  

  

  %check

  # Check the AppData add-on to comply with guidelines.

- appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.metainfo.xml

+ appstream-util validate-relax --nonet %{buildroot}%{appdata_dir}/vim-syntastic.metainfo.xml

  

  

  %files

@@ -277,6 +276,12 @@ 

  

  

  %changelog

+ * Wed Nov 20 2019 Markus Linnala <markus.linnala@gmail.com> - 3.10.0-3

+ - Add upstream patch vim-syntastic-3.10.0-5-rvim.patch to fix bz#1773723

+ 

+ * Wed Nov 20 2019 Markus Linnala <markus.linnala@gmail.com> - 3.10.0-2

+ - Simplify install/mkdir using install -D

+ 

  * Thu Oct 03 2019 Pavel Raiskup <praiskup@redhat.com> - 3.10.0-1

  - new upstream release (rhbz#1758038)

  

Mitigate rvim issue described at: bz#1773723
I've removed version bump from upstream patch to make it apply cleanly.

I've also added commit to simplify appdata / install+mkdir in spec.

Looks good, did you try that it actually helps? For some reason the simple-koji-ci hasn't started a scratch build.

Pull-Request has been merged by praiskup

2 months ago