Bug 1318991
| Summary: | Adding changelog entries errors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Harald Hoyer <harald> | ||||
| Component: | vim | Assignee: | Karsten Hopp <karsten> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 24 | CC: | athmanem, fszymanski, ignatenko, jjelen, karsten, moshima.web, rdieter | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-09-14 08:14:27 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 1147691 [details]
simple patch to accept strings in vim.command
This issue hit stable Fedora23 yesterday. Any updates?
Error detected while processing function <SNR>23_SpecChangelog[49]..<SNR>23_GetRelVer:
line 19:
Traceback (most recent call last):
File "<string>", line 15, in <module>
vim.error: Vim(let):E15: Invalid expression: 7.2p2
Attaching patch which resolved the issue for me. Even though the behaviour is changed since the last release, at least it does not fail hard with string versions.
I hope there should be some function like repr() in python. Will check it tomorrow. please test vim-7.4.1786-1.fc24, currently in f24-updates-candidate Yes. It seems to fix the original problem. Thank you. FYI, vim-enhanced-7.4.1797-3.fc23 (koji build 758616) still has the issue while in the changelog states that it was fixed.
]$ rpm -q --changelog vim-enhanced |head -n 30
* Fri Apr 29 2016 Karsten Hopp <karsten> - 7.4.1797-3
[...]
* Tue Apr 26 2016 Karsten Hopp <karsten> - 7.4.1775-2
- fix error in spec.vim (rhbz#1318991)
[...]
$ vi /usr/share/vim/vim74/ftplugin/spec.vim
[...]
42 version = headers["Version"]
43 release = headers["Release"]
44 vim.command("let ver = " + version)
45 vim.command("let rel = " + release)
46 PYEND
[...]
It is broken again: Error detected while processing function <SNR>22_SpecChangelog[49]..<SNR>22_GetRelVer: line 20: Traceback (most recent call last): File "<string>", line 16, in <module> vim.error: Vim(let):E15: Invalid expression: 7.2p2 Press ENTER or type command to continue both on Fedora 23 and Fedora 24: vim-common-7.4.1868-1.fc23.x86_64 vim-common-7.4.1868-1.fc24.x86_64 Fixing using the above patch will suppress the error, but won't append the version and release. If you search for a reproducer, openssh spec file is a good candidate. *** This bug has been marked as a duplicate of bug 1297746 *** |
$ rpm -qf /usr/share/vim/vim74/ftplugin/spec.vim vim-common-7.4.1344-1.fc24.x86_64 With a spec file like this: Name: dracut Version: 044 Release: 18.git20160108%{?dist} and trying to add a changelog entry with "\c", vim errors out with: Error detected while processing function <SNR>22_SpecChangelog[49]..<SNR>22_GetRelVer: line 20: Traceback (most recent call last): File "<string>", line 17, in <module> vim.error: Vim(let):E121: Undefined variable: git20160108 This is caused by /usr/share/vim/vim74/ftplugin/spec.vim line 44 and: vim.command("let rel = " + release) which should probably be changed to: vim.command("let rel = \"" + release + "\"") and maybe also: vim.command("let ver = " + version) to: vim.command("let ver = \"" + version + "\"")