Subject: Re: Perl packlist
To: Johnny C. Lam <lamj@stat.cmu.edu>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: tech-pkg
Date: 04/17/2001 00:22:48
> > 1) I currently have Perl-5.6.0. I didn' expect PERL5_ARCHLIB to point to
> > the 5.00404 directory. Is it the normal behavior?
> bsd.pkg.mk dynamically computes these values using the currently
> installed perl5 binary.  Your results imply that you have a
> perl-5.00404 binary in your path that is being detected at
> ${LOCALBASE}/bin/perl.

Well, There is something strange here.
$ which perl
/usr/pkg/bin/perl
$ perl -v

This is perl, v5.6.0 built for powerpc-netbsd
(snip)

$ ls -ld /var/db/pkg/perl-*                             
drwxr-xr-x  2 root  wheel  512 Apr 16 21:00 /var/db/pkg/perl-5.6.0nb4/
drwxr-xr-x  2 root  wheel  512 Apr 16 21:00
/var/db/pkg/perl-base-5.6.0nb1/
drwxr-xr-x  2 root  wheel  512 Apr 16 21:00 /var/db/pkg/perl-mk-1.0/

There is nothing like a perl-5.00404 on my system

> > 2) How do I tell the package system to go in
> > site_perl/5.6.0/powerpc-netbsd ?
> This should be the value of ${PERL5_SITEARCH} if perl-5.6.0 is
> installed.  Please just double check your pkgsrc installation of perl
> and make sure everything is okay first.

Well, if I ask perl about this, just the way bsd.pkg.mk does, perl tells
me the right things:
perl -V:installsitearch
installsitearch='/usr/pkg/lib/perl5/site_perl/5.6.0/powerpc-netbsd';

But a make show-var VARNAME=PERL5_SITEARCH tells this:
$ show-var VARNAME=PERL5_SITEARCH
/usr/pkg/lib/perl5/site_perl/powerpc-netbsd

How does the 5.6.0 got stripped? Is there some black magic here?

More black magic:
$ make show-var VARNAME=PERL5_ARCHLIB
/usr/pkg/lib/perl5/powerpc-netbsd/5.00404
$ perl -V:installarchlib
installarchlib='/usr/pkg/lib/perl5/5.6.0/powerpc-netbsd';

I checked there is no other perl in my PATH:
$ for i in `echo $PATH|sed 's|:| |g'` ; do test -f $i/perl && echo $i ;
done
/usr/pkg/bin
/usr/pkg/bin

(oddly, I have it twice in my PATH)

-- 
Emmanuel Dreyfus.  
Pas de processeur Intel, pas de logiciels Microsoft:
Des programmes sains dans un ordinateur sain.
p99dreyf@criens.u-psud.fr