Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #13401 (closed defect: fixed)

Opened 12 months ago

Last modified 5 weeks ago

git-core with +svn produces a git-svn that uses the wrong perl binary

Reported by: tim.stoop@… Owned by: blb@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.5.2
Keywords: git-svn perl Cc: boeyms@…, bryan@…, blb@…, maccheck@…, dbueno@…
Port: git-core

Description (last modified by jmpp@…) (diff)

After building git-core with +svn, I tried to start git-svn and get the following message:

asterisk:~ tim$ git-svn
Can't locate SVN/Core.pm in @INC (@INC contains: /opt/local/lib/perl5/site_perl/5.8.8 /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at /opt/local/bin/git-svn line 24.
asterisk:~ tim$

I can solve this by editing the hashbang of /opt/local/bin/git-svn and changing it to: #! /opt/local/bin/perl

Should be a patch?

Attachments

git-core.diff (1.2 KB) - added by blb@… 4 months ago.
diff to Portfile

Change History

  Changed 12 months ago by jmpp@…

  • description modified (diff)
  • milestone changed from MacPorts base bugs to Port Bugs

Please read WikiFormatting for proper markup of terminal output (also this is a port bug, not a MacPorts one, so I'm adapting the milestone accordingly).

-jmpp

follow-up: ↓ 3   Changed 11 months ago by boeyms@…

  • cc boeyms@…, bryan@… added
  • owner changed from macports-tickets@… to boeyms@…

Cc-ing to port maintainer; I would reassign this ticket to the maintainer, but he doesn't currently appear in the list of assignees, so I'm assigning this to myself instead.

I don't get this problem on my system; for me, SVN/Core.pm is installed in /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/SVN/Core.pm and provided by the subversion-perlbindings port, which git-core +svn depends on via p5-svn-simple.

It seems from your output from git-svn that, somehow, your system isn't running the MacPorts' perl in a normal way when using #!/usr/bin/env perl (since @INC doesn't include /opt/local/lib/perl5/vendor_perl). It therefore doesn't look to me at the moment like a problem with the port per se. As a starting point, could you please report for us:

  1. which version of MacPorts, Xcode and Mac OS X you are running (I assume that you are indeed running MacPorts 1.5.2, but I'd just like to make sure);
  2. what your output from echo ${PATH} is; and
  3. what your output from which perl is.

Thanks!

in reply to: ↑ 2   Changed 11 months ago by tim.stoop@…

Replying to boeyms@macports.org:

1. which version of MacPorts, Xcode and Mac OS X you are running (I assume that you are indeed running MacPorts 1.5.2, but I'd just like to make sure);

I was at the time. Recently did a port selfupdate.

2. what your output from echo ${PATH} is; and

asterisk:~ tim$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/sbin:/Users/tim/bin
asterisk:~ tim$

3. what your output from which perl is.

asterisk:~ tim$ which perl
/usr/bin/perl
asterisk:~ tim$

I noticed this while doing a complete reinstall of the system. Well, of the ports at least. My commands were as follows:

sudo port -f uninstall installed; sudo port clean all; sudo port install git-core +svn

Not sure if you can do it any more clean than that. I've got it working, but a hint to keep it working after an update would be appreciated :)

  Changed 4 months ago by blb@…

  • cc blb@… added

Will attach a patch to the Portfile which should take care of this; easy to do since PERL_PATH was already in use in the Portfile.

Changed 4 months ago by blb@…

diff to Portfile

  Changed 7 weeks ago by boeyms@…

  • cc maccheck@… added
  • owner changed from boeyms@… to bryan@…

Reassigning to one of the port maintainers, and cc'ing to the other named maintainer. I can confirm that, as of version 1.6.0.2, the initial 2 lines of git-svn, which is now at /opt/local/libexec/git-svn, are:

#!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB} || "/opt/local/lib/perl5/site_perl"));

so I assume that this still is a problem. In any case, we should be consistent about using MacPorts' perl.

  Changed 6 weeks ago by dbueno@…

  • cc dbueno@… added

Cc Me!

  Changed 6 weeks ago by dbueno@…

I also have this problem -- The first line of /opt/local/libexec/git-core/git-svn refers explicitly to /usr/bin/perl, which is what I think is the cause.

I'm running MacPorts 1.600.

$ echo $PATH
/Users/denbuen/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/sbin:/bin:/Users/denbuen/apps/ocaml/bin:/Users/denbuen/.cabal/bin:/Users/Shared/apps:/Users/Shared/app

$ which perl
/opt/local/bin/perl

Incidentally, I have just reinstalled MacPorts by removing /opt and starting from the MacPorts disk image. The only command I typed before I got the symptom this ticket reports was:

sudo port install git-core @1.6.0.2_0+bash_completion+doc+gitweb+svn

  Changed 5 weeks ago by maccheck@…

Sorry for responding so late. This is related to bug #16612 where we discuss the same issue. I wasn't aware of this bug here before. I already provided a patch in the mentioned bug, but as I don't have SVN write permissions I cannot upload it. It's similar to the patch that was posted here.

  Changed 5 weeks ago by blb@…

  • owner changed from bryan@… to blb@…
  • status changed from new to assigned

  Changed 5 weeks ago by blb@…

  • keywords git-core removed
  • status changed from assigned to closed
  • resolution set to fixed
  • port set to git-core

Patch from #16612 applied in r40841.

Note: See TracTickets for help on using tickets.