From dfd24f3f6d959e902c3ef18b2964c2ba6b7dac8a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Aug 06 2012 16:46:02 +0000 Subject: update epoch patch --- diff --git a/vim-7.3-spec-epoch.patch b/vim-7.3-spec-epoch.patch index 8305de7..398af28 100644 --- a/vim-7.3-spec-epoch.patch +++ b/vim-7.3-spec-epoch.patch @@ -1,18 +1,46 @@ -42a43 -> let epoch = "" -46a48 -> let epochline = -1 -53a56,58 -> elseif (epoch == "" && linestr =~? '^Epoch:') -> let epochline = line -> let epoch = substitute(strpart(linestr,6), '^[ ]*\([^ ]\+\)[ ]*$','\1','') -69a75 -> let epoch = s:ParseRpmVars(epoch, epochline) -92c98,102 -< let release_info = ver."-".rel ---- -> if (epoch == "") -> let release_info = ver."-".rel -> else -> let release_info = epoch.":".ver."-".rel -> endif +--- vim73/runtime/ftplugin/spec.vim 2012-08-06 17:51:41.000000000 +0200 ++++ /tmp/spec.vim 2012-08-06 17:51:07.730701143 +0200 +@@ -40,10 +40,12 @@ + endif + let line = 0 + let name = "" ++ let epoch = "" + let ver = "" + let rel = "" + let nameline = -1 + let verline = -1 ++ let epochline = -1 + let relline = -1 + let chgline = -1 + while (line <= line("$")) +@@ -51,6 +53,9 @@ + if (name == "" && linestr =~? '^Name:') + let nameline = line + let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','') ++ elseif (epoch == "" && linestr =~? '^Epoch:') ++ let epochline = line ++ let epoch = substitute(strpart(linestr,6), '^[ ]*\([^ ]\+\)[ ]*$','\1','') + elseif (ver == "" && linestr =~? '^Version:') + let verline = line + let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') +@@ -67,6 +72,7 @@ + if (nameline != -1 && verline != -1 && relline != -1) + let include_release_info = 1 + let name = s:ParseRpmVars(name, nameline) ++ let epoch = s:ParseRpmVars(epoch, epochline) + let ver = s:ParseRpmVars(ver, verline) + let rel = s:ParseRpmVars(rel, relline) + else +@@ -89,7 +95,11 @@ + execute "language time C" + let parsed_format = "* ".strftime(format) + execute "language time " . save_time +- let release_info = ver."-".rel ++ if (epoch == "") ++ let release_info = ver."-".rel ++ else ++ let release_info = epoch.":".ver."-".rel ++ endif + let wrong_format = 0 + let wrong_release = 0 + let insert_line = 0