Mar 102012
 

Well, perhaps not 5000 errors, but quite a lot of errors.

A recent change to Mk/bsd.perl.mk has caused all sorts of grief on two of the FreshPorts servers. The problem occurs when specifying PORTDIR. Here is an example:

#!/bin/sh

make -V BUILD_DEPENDS -V FORBIDDEN \
-f /usr/home/dan/ports/databases/p5-DBIx-Class/Makefile DISTDIR=/usr/ports/distfiles PORTSDIR=/usr/home/dan/ports

make -V BUILD_DEPENDS -V FORBIDDEN \
-f /usr/home/dan/ports/databases/p5-DBIx-Class/Makefile DISTDIR=/usr/ports/distfiles

The difference in the output for perl.

/usr/local/bin/perl5.8.9:/usr/home/dan/ports/lang/
/usr/local/bin/perl5.8.9:/usr/ports/lang/perl5.8

That is the problem. There is no port called lang. Thus, when FreshPorts tries to add the dependencies, it errors.

The system which works is using revision 1.22 of perl.mk. The system which fails is using revision 1.23.

The diff is:

 diff bsd.perl.mk ~dan/ports/Mk/bsd.perl.mk | less
4c4
< # $FreeBSD: ports/Mk/bsd.perl.mk,v 1.23 2012/03/08 18:37:53 pgollucci Exp $
---
> # $FreeBSD: ports/Mk/bsd.perl.mk,v 1.22 2011/08/15 06:50:00 sunpoet Exp $
70a71,74
> .elif  ${PERL_LEVEL} >= 501000
> PERL_PORT?=   perl5.10
> .else # ${PERL_LEVEL} < 501000
> PERL_PORT?=   perl5.8

Before you ask, this is the setting on all systems, regardless of success or failure:

$ grep PERL_VERSION /etc/make.conf
PERL_VERSION=5.8.9

The fix is as follows:

$ diff  ~dan/ports/Mk/bsd.perl.mk ~dan/ports/Mk/bsd.perl.mk~
71,72d70
< .else
< PERL_PORT?=     perl5.8

Thanks to aDe and melflynn for helping me track this down and come up with a fix to stop the errors.

Hopefully this will be fixed in Mk/ soon.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

  3 Responses to “Mk/bsd.perl.mk bug causes 5000 errrors….”

  1. The change which triggered this problem has been reverted.

  2. I have a few ports to clean up.

    freshports.org=# select count(*) from ports_active where depends_build like ‘%/lang’ or depends_build like ‘%/lang %’ or depends_run like ‘%/lang’ or depends_run like ‘%/lang %’ or
    depends_lib like ‘%/lang’ or depends_lib like ‘%/lang %’;
    count
    ——-
    404
    (1 row)

    freshports.org=#

  3. And here is how I think we can fix it:

    -- this will cause all the ports in that commit to be refreshed
    
    UPDATE commit_log_ports
       SET needs_refresh = 7
     WHERE commit_log_id = 428321;
    
    -- what ports have been updated since this commit?
    
    SELECT 'http://beta.freshports.org/' || category || '/' || name || '/'
      FROM ports_active
     WHERE last_commit_id > 428321
       AND id in (SELECT port_id
                    FROM commit_log_ports
                   WHERE commit_log_id = 428321);
    

    The ports in question are:

    http://beta.freshports.org/databases/p5-DBIx-QueryLog/
    http://beta.freshports.org/devel/p5-Test-Spec/
    http://beta.freshports.org/devel/p5-POE/
    http://beta.freshports.org/devel/p5-Params-Util/
    http://beta.freshports.org/devel/p5-Carp-Always-Color/
    http://beta.freshports.org/dns/p5-Net-DNS/
    http://beta.freshports.org/mail/p5-Mail-SpamAssassin/
    http://beta.freshports.org/net/p5-Socket/
    http://beta.freshports.org/net/p5-Net-CLI-Interact/
    http://beta.freshports.org/security/p5-IO-Socket-SSL/

    Let’s see if this works.