[MacPorts] #19706: gnc-fq-dump (GnuCash) invokes Apple Perl, not MacPorts Perl
MacPorts
noreply at macports.org
Thu May 21 00:46:21 PDT 2009
#19706: gnc-fq-dump (GnuCash) invokes Apple Perl, not MacPorts Perl
------------------------------------+---------------------------------------
Reporter: from.macports@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.7.1
Keywords: | Port: gnucash
------------------------------------+---------------------------------------
gnucash installs four Perl scripts in ${prefix}/bin to install and
administer gnucash's use of the perl Finance::Quote module. Following the
instructions at GnuCash manual "8.6.3.1. Installing Finance::Quote":
<http://svn.gnucash.org/docs/guide/invest-stockprice1.html#invest-
stockprice-auto2>
I ran:
{{{
% sudo gnc-fq-update
Password:
CPAN: Storable loaded ok (v2.19)
Going to read /Users/jdlh/.cpan/Metadata
Database was generated on Tue, 19 May 2009 23:26:58 GMT
LWP is up to date (5.826).
Date::Manip is up to date (5.54).
HTML::Parser is up to date (3.60).
HTML::TableExtract is up to date (2.10).
Crypt::SSLeay is up to date (0.57).
Finance::Quote is up to date (1.16).
}}}
But the corresponding check failed:
{{{
% gnc-fq-dump
/opt/local/bin/gnc-fq-dump cannot find all the Perl modules needed to run.
You need to install the following Perl modules:
Finance::Quote
HTML::TableExtract
Crypt::SSLeay
Date::Manip
Use your system's package manager to install them,
or run 'gnc-fq-update' as root.
}}}
I believe the cause of the bug is that the file gnc-fq-dump is invoking
the wrong Perl interpreter. It's asking for /usr/bin/perl, the standard
Apple Perl interpreter with the standard Apple libraries. The other gnc-
fq-* tools invoke /opt/local/bin/perl -w , the Perl and libraries
installed by MacPorts.
{{{
% head -1 gnc-fq-*
==> gnc-fq-check <==
#!/opt/local/bin/perl -w
==> gnc-fq-dump <==
#!/usr/bin/perl
==> gnc-fq-helper <==
#!/opt/local/bin/perl -w
==> gnc-fq-update <==
#!/opt/local/bin/perl -w
}}}
I know very little about Perl and MacPorts, but in a bit of searching I
didn't see an easy way to change the @INC path of /usr/bin/perl to include
the MacPorts libraries. Thus it seems to me that the perl interpreter path
in gnc-fq-dump should be changed to make its first line
{{{
#!/opt/local/bin/perl -w
}}}
instead of #!/usr/bin/perl .
--
Ticket URL: <http://trac.macports.org/ticket/19706>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list