From owner-freebsd-ports@FreeBSD.ORG Tue Jul 14 10:35:13 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DACC106564A; Tue, 14 Jul 2009 10:35:13 +0000 (UTC) (envelope-from cm@therek.net) Received: from lux.therek.net (lux.therek.net [64.85.172.243]) by mx1.freebsd.org (Postfix) with ESMTP id 1A61A8FC1B; Tue, 14 Jul 2009 10:35:12 +0000 (UTC) (envelope-from cm@therek.net) Received: from [10.3.81.80] (gate01.polsat.net.pl [193.164.142.33]) (authenticated bits=0) by lux.therek.net (8.14.3/8.14.3) with ESMTP id n6EAZ7O5021308 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 14 Jul 2009 12:35:10 +0200 (CEST) Message-ID: <4A5C5F55.4090204@therek.net> Date: Tue, 14 Jul 2009 12:35:01 +0200 From: Cezary Morga User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Matthew Seaman References: <20090706181739.D2DB28FCB7@release.ixsystems.com> <4A5363AA.8030407@infracaninophile.co.uk> <4A5B97D7.2070708@therek.net> <4A5C4E73.9000901@infracaninophile.co.uk> In-Reply-To: <4A5C4E73.9000901@infracaninophile.co.uk> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: QAT@freebsd.org, freebsd ports Subject: Re: [Custom LOCALBASE/PREFIX] www/p5-RT-Extension-SLA - fails: mtree X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 10:35:13 -0000 Matthew Seaman pisze: > I think that your patch essentially does that, but see ports/136656 where > I have a simpler solution -- just remove $PREFIX from the environment > during configuration. I don't think removing PREFIX is a good idea. FreeBSD is supposed to support PREFIX for users wishing to install ports elsewhere than /usr/local, that's what this QAT tests 'Custom LOCALBASE/PREFIX' are about. The problem with inc/Module/Install/RTx.pm from www/p5-RT-Extension-SLA is that it assumes that PREFIX is always correct: my @prefixes = (qw(/opt /usr/local /home /usr /sw )); my $prefix = $ENV{PREFIX}; <...> if ($prefix) { $RT::LocalPath = $prefix; $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm"; } else { and does not even try loading the module, as ( eval { require RT; $RT::LocalPath } ) is located in else{}. Then it goes to using $RT variables my $local_lib_path = "$RT::LocalPath/lib"; <...> $RT::LocalVarPath ||= $RT::VarPath; $RT::LocalPoPath ||= $RT::LocalLexiconPath; $RT::LocalHtmlPath ||= $RT::MasonComponentRoot; $RT::LocalLibPath ||= "$RT::LocalPath/lib"; which are not set. Removing PREFIX will skip if ($prefix) {} part and trigger else{} but with RT.pm installed elsewhere than locations listed in @prefixes it will still fail. Not to mention the different meanings of environment variable PREFIX from FreeBSD ports and RT points of view. For RT PREFIX==LOCALBASE, which might not be true in FreeBSD world. If you really want to fiddle with environment settings, I'd suggest no to remove PREFIX from the environment, but set it to RTHOME (if RTHOME honors LOCALBASE/PREFIX). The problem with LOCALBASE!=PREFIX will remain unsolved either way. -- Cezary Morga