Hide Forgot
Description of problem: 'git add --patch' fails (see below) due to a missing dependency on perl(Error). Version-Release number of selected component (if applicable): git-1.7.4.1-1.el5 How reproducible: Always or never, depending on installed packages. Steps to Reproduce: 1. Set up a git repo (or use an existing one) 2. Modify some files 3. Run 'git add --patch' Actual results: Can't locate Error.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 101. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Git.pm line 101. Compilation failed in require at /usr/bin/git-add--interactive line 7. BEGIN failed--compilation aborted at /usr/bin/git-add--interactive line 7. Expected results: Works. Additional info: Installing the perl-Error package resolves the issue. See also https://bugzilla.redhat.com/show_bug.cgi?id=356521.
git-1.7.4.1-1.el5 does require perl(Error). I'm not sure how you've installed it and not had the required perl package installed. If you try 'yum remove perl-Error' you should see it attempt to uninstall git as well. Can you paste the output of that yum remove command?
Aaaah... okay, I found the problem. I have a "rogue" package on my system that 'Provides: perl(Error)'. I'll report this to the maintainer of said (third party) package. Thanks.