FS#15403 - [vim] refuses to start with mercurial 1.3

Attached to Project: Arch Linux
Opened by serge (xchllataa) - Monday, 06 July 2009, 14:28 GMT
Last edited by Allan McRae (Allan) - Tuesday, 07 July 2009, 13:57 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Douglas Soares de Andrade (dsa)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
After recent mercurial update (1.2.1-1 -> 1.3-1) vim refuses to start:
$ vim
Error detected while processing /etc/vimrc:
line 47:
E484: Can't open file /usr/share/vim/vim72/syntax/syntax.vim
Press ENTER or type command to continue

It is because mercurial installs a file to /usr/share/vim/vim72/syntax/HGAnnotate.vim. If the /usr/share/vim/vim72 directory is removed, vim works.

Additional info:
vi 7.2.65-1
vim 7.2.65-1.1
mercurial 1.3-1
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 07 July 2009, 13:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  mercurial 1.3-2
Comment by Tobias Kieslich (tobias) - Monday, 06 July 2009, 15:15 GMT
all that means is, that mercurial uses vim's new runtimedir, which the vim in testing is using. The vim in extra still uses /usr/share/vim. So if mercurial would install it's file then you should be fine. How ever that does not explain why your /etc/vimrc points to the new directory. It seems your installation is borked.
Comment by Giuseppe Borzi (gborzi) - Monday, 06 July 2009, 20:09 GMT
I have the same problem with both vim and gvim, they start but don't show any syntax highlighting. The error message I get from gvim is

Error detected while processing /etc/vimrc:
line 47:
E484: Can't open file /usr/share/vim/vim72/syntax/syntax.vim
Error detected while processing /home/gborzi/.vimrc:
line 20:
E484: Can't open file /usr/share/vim/vim72/syntax/syntax.vim

Error detected while processing /etc/gvimrc:
line 35:
E484: Can't open file /usr/share/vim/vim72/syntax/syntax.vim

every line where the error is detected contains "syntax on". I have reinstalled both vim and gvim and they still give the error message, so I'd say that's not a borked installation problem.
Comment by Kirk (mkfort) - Monday, 06 July 2009, 20:19 GMT
I also have this problem and haven't edited vimrc
Comment by Tobias Kieslich (tobias) - Monday, 06 July 2009, 21:49 GMT
/usr/share/vim/vim72/syntax/syntax.vim is only used in testing vim. No othe files have been touched for that. My money is on repository mixup.
Comment by Douglas Soares de Andrade (dsa) - Tuesday, 07 July 2009, 01:39 GMT
Hi all,

Im with core and extra repo enabled in my machine, so im sure it is not the cause of the problem.

Tobias, by the way, the testing vim did not go to extra/core ? Im sure i have not using testing for a long time and it is fresh install of x86_64 arch.
Comment by Douglas Soares de Andrade (dsa) - Tuesday, 07 July 2009, 01:50 GMT
Hum, try now. For some reason, mercurial PKGBUILD was uploading vim files to the above dir.
Comment by serge (xchllataa) - Tuesday, 07 July 2009, 02:34 GMT
Hello,
I don't have testing repo enabled. Also I have never modified /etc/vimrc. So it is not a repository mixup.
Comment by Magnus Therning (magus) - Tuesday, 07 July 2009, 06:57 GMT
I think the correct way to fix the bug is to change where the vim file is installed. At least I think that's better than not installing it at all.

The attached diff against the PKGBUILD modifies the path of the vim file (HGAnnotat.vim). It also replaces use of $startdir/{pkg,src} with ${pkg,src}dir as an added bonus :-)

IIRC there's been some discussion about the location of vim files, /usr/share/vim or /usr/share/vim/vim72. I don't know if it has been settled once and for all yet.
Comment by Arthur Huillet (ahuillet) - Tuesday, 07 July 2009, 08:54 GMT
Hi,

I would believe vim is not at fault here.
It's the mercurial package that does not install its syntax file at the right place, then vim when it starts seems a "vim72" directory and attempts to use it.

The fix has to go into mercurial so HGAnnotate.vim goes into /usr/share/vim/syntax and not /usr/share/vim/vim72/syntax.

I am new to this bug reporting tool so I don't know whether I should open up a new bug entry tagged [mercurial] or not.

Loading...