(This is related to bug 19115, which I don't feel was properly resolved, but I can't reopen it) In reply to bug 19115, comment 3: This (installing gvim) is a rather poor fix for the problem. Specifically, vim _should_ link against X11, rather than forcing people with USE="X" to go through hoops in order to use vim as it was meant to be used, and as my USE flags dictate that it should be used. Also note that linking against X does more than simply change the xterm title, it also makes your vim selections available in the X copy buffer. >>> First, I think you're right, that the vim ebuild should not link against the X libraries. It kinda obviates the point of having a leaner terminal-based version of vim. So I will make that change. <<< In the case that you want a "leaner terminal-based version of vim," you are perfectly free to ``USE="-X" emerge vim''. That's the whole point of use flags, after all. Furthermore, your solution to install gvim does NOT work as the gvim package does not install all of the various tools vim comes with - vimdiff, view, rview, ex, etc. Yes, these can all be linked to /usr/bin/gvim, but they aren't linked - and shouldn't be, as 'gvim' should NOT be providing 'vim' functionality as a result of the 'vim' ebuild ignore use flags. Another bug to point out with this "solution" is that the /usr/bin/vim, and /usr/bin/vi symlinks aren't _removed_ when unmerging gvim, nor are they identified via `qpkg -f'. >>> Finally, note that the real problem in your bug report was a vim bug. Vim normally drops to terminal mode when it can't establish the X connection. This was reported and fixed in vim recently. The fix is available in 6.2a, aka 6.2_pre1 in Gentoo. <<< Doesn't that mean that the change, which I'm sure is annoying more than just me, is not needed? If that is the case, can you please undo it (for vim6.2+, anyway)? The way things are being done in bug 19115 make it seem like the vim ebuild is completely ignoring the entire point of USE flags - if I want to use 'X', then whatever supports X should enable it. Could you at least provide some sort of 'unofficial' "vimX" flag for us users who want vim as it is meant to be? The fix to 19115 should have been "You can get around it by doing: `USE="-X" emerge vim'", rather than "Let me change the ebuild so that the 'vim' ebuild ignores your X use flag." I want to point out that I am strongly opposed to this, because I feel it starts to erode the only real advantage Gentoo has over other linux distributions: USE flags.
This bug speaks for the usefulness of package dependent use flags - i.e. being able to set USE="-X" _only_ for the vim package.
Hi Jason, I agree with you in every way. It's just that I'm sick of getting bug reports that say "terminal vim links against X libraries". I get so many complaints on that score that I thought the resolution in bug 19115 was a good one. Perhaps it wasn't. Regarding the symlinks in /usr/bin not being removed, I'm aware of that problem. AFAIK there is no way in Gentoo yet to solve that. There is no concept of alternatives as in Debian, nor of triggers as in RH. I solved this in a vim rpm by having symbolic links owned by and automatically updated by the vim-common package. In this way, I was able to easily supply rpms for xvim, gvim (linked against gtk), and mvim. It worked out quite well. However, that's quite a tangent. We don't have that sort of thing on Gentoo yet. I could check for dead links in a post uninstall script (I think we have that), but it's still not a great solution. Especially since the symlinks still won't be owned by any package. I think your suggestion of a local USE flag will be the best. Honestly, I think most people aren't going to care if they have X functionality in console vim (:set mouse is probably another thing that depends on X libs) but it will be available to those that really want it. I'm included in that list... ;-) Does this cover things well? Regarding the symlinks, I'll probably leave that in since it isn't hurting anything at the moment, but it will be nice to get a better solution in the future. Aron
Are you suggesting, then, adding some sort of "xvim" use flag for the vim package? I'd think that solution ought to keep us hardcore vim users happy ;)
Done. The local USE variable is "vim-with-x". It's done in the eclass, so it will work for any version of vim in the tree.