Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259661 - Genlop's hashbang should be change to use prefix tools.
Summary: Genlop's hashbang should be change to use prefix tools.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 01:38 UTC by nietonfir
Modified: 2009-03-02 15:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the hashbang to work with prefix-perl instead of system-perl. (genlop-0.30.8-r2_hashbang.patch,484 bytes, patch)
2009-02-20 01:40 UTC, nietonfir
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nietonfir 2009-02-20 01:38:55 UTC
Genlop's current hasbang is: #!/usr/bin/env perl
Result (for me):
Can't locate Date/Manip.pm in @INC (@INC contains: /opt/local/lib/perl5/5.8.9/darwin-2level /opt/local/lib/perl5/5.8.9 /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level /opt/local/lib/perl5/site_perl/5.8.9 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.9 /opt/local/lib/perl5/vendor_perl .) at /Users/*/Gentoo/usr/bin/genlop line 24.
BEGIN failed--compilation aborted at /Users/*/Gentoo/usr/bin/genlop line 24.

Changing it to (expanded) $EPREFIX/usr/bin/perl did it for me.

Patch provided.

Reproducible: Always

Steps to Reproduce:
1.emerge genlop
2.genlop
3.fails (look at description)
Comment 1 nietonfir 2009-02-20 01:40:28 UTC
Created attachment 182599 [details, diff]
Fixes the hashbang to work with prefix-perl instead of system-perl.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-02-20 03:22:11 UTC
This is incorrect, a proper fix will be to make a sed statement that places @GENTOO_PORTAGE_EPREFIX@ instead of EPREFIX in there then call eprefixify on the file. I know we don't have very good docs on this yet. The reason is simple, any app in prefix should work without being in a prefix env. (Including where EPREFIX is not set).
Comment 3 Fabian Groffen gentoo-dev 2009-02-20 07:09:21 UTC
The real problem in your case is why /usr/bin/env perl doesn't find your Prefix perl.  I suspect a path issue.  Do you use startprefix.sh?  Does your bashrc overwrite the path perhaps?  From where do you call genlop?
Comment 4 nietonfir 2009-02-20 11:10:41 UTC
(In reply to comment #2)
> This is incorrect, a proper fix will be to make a sed statement that places
> @GENTOO_PORTAGE_EPREFIX@ instead of EPREFIX in there then call eprefixify on
> the file. I know we don't have very good docs on this yet. The reason is
> simple, any app in prefix should work without being in a prefix env. (Including
> where EPREFIX is not set).
> 
I am eager to learn. ;)

(In reply to comment #3)
> The real problem in your case is why /usr/bin/env perl doesn't find your Prefix
> perl.  I suspect a path issue.  Do you use startprefix.sh?  Does your bashrc
> overwrite the path perhaps?  From where do you call genlop?
> 

This is true. I have _export PATH=/opt/local/bin:/opt/local/sbin:$PATH_ set in .bash_login for my current macports installation. I don't use startprefix.sh but adapted Terminal.app to use $EPREFIX/bin/bash as default shell, so I technically am in a "startprefix.sh" environment.

Sorry for wasting your time, commenting the export clause did it. Fixed for me.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-03-02 15:22:49 UTC
resolving as fixed.