FreeBSD Port: Error Upgrading Perl 5.8.9

Usually I perform portupgrade daily on some of my FreeBSD Servers, not all at once of cause. This afternoon I came to a problem when performing upgrade for Perl 5.8.9 The upgrade was failed error show as below;


/bin/mkdir -p /usr/local/lib/perl5/5.8.9/BSDPAN/.
install  -o root -g wheel -m 444  /usr/ports/lang/perl5.8/work/BSDPAN-5.8.9/BSDPAN.pm /usr/local/lib/perl5/5.8.9/BSDPAN/BSDPAN.pm
install: /usr/ports/lang/perl5.8/work/BSDPAN-5.8.9/BSDPAN.pm: No such file or directory
*** Error code 71

Somehow it shown BSDPAN.pm is missing, so I try to search for the file;


shell> locate BSDPAN.pm
/usr/local/lib/perl5/5.8.9/BSDPAN/BSDPAN.pm

Try to crave for more information for the file;


shell> ls -al /usr/local/lib/perl5/5.8.9/BSDPAN/BSDPAN.pm
ls: /usr/local/lib/perl5/5.8.9/BSDPAN/BSDPAN.pm: No such file or directory

File not found, I guess something is wrong with the Perl 5.8.9 Makefile. After a while, I did portsnap fetch update to get latest port tree update.

I guess there were some error with the Makefile, tried to do diff after I got the latest Perl Makefile and previous error Makefile;


shell> diff Makefile.perl.1 Makefile.perl.2 
5c5
< # $FreeBSD: ports/lang/perl5.8/Makefile,v 1.100 2009/02/15 22:42:37 skv Exp $
---
> # $FreeBSD: ports/lang/perl5.8/Makefile,v 1.101 2009/02/16 07:27:41 itetcu Exp $
146c146
< BSDPAN_WRKSRC=        ${WRKDIR}/BSDPAN-${PORTVERSION}
---
> BSDPAN_WRKSRC=        ${WRKDIR}/BSDPAN-${BSDPAN_VERSION}

Problem fixed after few hours, the BSDPAN_WRKSRC was configured on the wrong path. Hope this mistake won’t happen again 😉