Opened 15 years ago

Closed 15 years ago

#19706 closed defect (fixed)

gnc-fq-dump (GnuCash) invokes Apple Perl, not MacPorts Perl

Reported by: JDLH (Jim DeLaHunt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: gnucash

Description

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 .

Change History (1)

comment:1 Changed 15 years ago by blb@…

Resolution: fixed
Status: newclosed

Yup, the script should be using MacPorts' perl instead of the system one, fixed in r51268.

Note: See TracTickets for help on using tickets.