Bug 1969936
Summary: | Failed to source defaults.vim | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Cagney <cagney> |
Component: | vim | Assignee: | Karsten <karsten> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 34 | CC: | gchamoul, John.Ruckstuhl, j, karsten, m-teuber, twsnnva, zdohnal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | vim-8.2.2956-2.fc34 vim-8.2.2956-2.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-06-16 01:03:59 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: | |||
Bug Depends On: | 1970330 | ||
Bug Blocks: |
Description
Cagney
2021-06-09 13:43:24 UTC
Hi, for me it works until Version 8.2.2879-1.fc34. Version 8.2.2932-1.fc34 got this bug for me, too. I see that the most recent Version (8.2.2956-1.fc34) throws this error too. Hi cagney and Markus, thank you for reporting the issue! Actually I found out two issues: 1) vi generates the error you reported - it is because upstream added this error once defaults.vim isn't loaded (patchlevel 2905), which isn't by design in case vi, because defaults.vim is shipped only in vim-common, which is dependency of vim-enhanced. 2) /etc/virc isn't loaded at all in case of 'vi' I'll look into this issue further. FYI the error is harmless, but annoying - you get into 'vi' after you press any key. Actually, I take back the 2) - /etc/virc is read by: 3162 (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE, NULL); The error is reported by this part of code: 3169 /* 3170 * Try to read initialization commands from the following places: 3171 * - environment variable VIMINIT 3172 * - user vimrc file (s:.vimrc for Amiga, ~/.vimrc otherwise) 3173 * - second user vimrc file ($VIM/.vimrc for Dos) 3174 * - environment variable EXINIT 3175 * - user exrc file (s:.exrc for Amiga, ~/.exrc otherwise) 3176 * - second user exrc file ($VIM/.exrc for Dos) 3177 * The first that exists is used, the rest is ignored. 3178 */ 3179 if (process_env((char_u *)"VIMINIT", TRUE) != OK) 3180 { 3181 if (do_source((char_u *)USR_VIMRC_FILE, TRUE, 3182 DOSO_VIMRC, NULL) == FAIL . . . 3202 && !has_dash_c_arg) 3203 { 3204 // When no .vimrc file was found: source defaults.vim. 3205 if (do_source((char_u *)VIM_DEFAULTS_FILE, FALSE, DOSO_NONE, 3206 NULL) == FAIL) 3207 emsg(e_failed_to_source_defaults); 3208 } which means defaults.vim is tried to be loaded if there is no user's .vimrc/.exrc files. But the same error happens once you call 'vi --clean'. I'll try to ship defaults.vim with vim-minimal too - I will need to change Conflicts between vim-common and vim-minimal again. If anyone wants to turn off defaults.vim for vim-minimal, you can add: let skip_defaults_vim = 1 into /etc/virc or into your personal ~/.virc. Sorry, the rebuild is blocked in rawhide. Vim started to fail with new Python3.10. I'll look into that too - reported here https://bugzilla.redhat.com/show_bug.cgi?id=1970330 . Pushed into rawhide for now, thought building it blocked - so the correct status is MODIFIED. *** Bug 1970721 has been marked as a duplicate of this bug. *** FEDORA-2021-e31e9c85c7 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e31e9c85c7 FEDORA-2021-9aac6c044c has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-9aac6c044c It works now. I am deeply impressed how friendly and fast you did this. Thanks a lot. FEDORA-2021-e31e9c85c7 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e31e9c85c7` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e31e9c85c7 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-9aac6c044c has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-9aac6c044c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-9aac6c044c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. (In reply to Markus Teuber from comment #12) > It works now. I am deeply impressed how friendly and fast you did this. > Thanks a lot. No problem, you're welcome - I can just hope you didn't mean it as a sarcasm :) . Thank you for reporting the issue! Seriously, no sarcasm. FEDORA-2021-e31e9c85c7 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. tks FEDORA-2021-9aac6c044c has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. Hi, I think a workaround to use until fix bubbles down to all ... touch ~/.exrc In other words, if vim is able to read even an empty .exrc, then it won't complain. If I'm misunderstanding something, pls let me know :) Hi John, the fix should be in Fedora for a year right now - do you still get the error? I've briefly checked F36 and the error is not shown, because defaults.vim is now provided by vim-data subpackage, which contains files needed by all Vim versions (vi/vim/gvim), which solves the issue for most people. But sure, your way works as well, although it requires user intervention, which I cannot imitate during packaging. |