Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 22880
Status: rejected
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: --prefix is incompatible with "export PREFIX"
In the most common use case, Module::Build is passed a --prefix value by CPAN.pm which it should continue to use as it runs. However, if the PREFIX environment variable exists, Module::Build initially saves the --prefix value to it's _build/runtime_params file, but then when it reloads the files, it overwrites it with PREFIX and then saves the broken version back again. Further, since both --prefix and PREFIX might potentially be relative paths, and the result of an install would be bizarre to say the least, the use of relative paths in --prefix or PREFIX should be fatal (for some definition of fatal)
On Mon Nov 06 23:45:20 2006, ADAMK wrote: Show quoted text
> In the most common use case, Module::Build is passed a --prefix value by > CPAN.pm which it should continue to use as it runs. > > However, if the PREFIX environment variable exists, Module::Build > initially saves the --prefix value to it's _build/runtime_params file, > but then when it reloads the files, it overwrites it with PREFIX and > then saves the broken version back again.
I don't think Module::Build does anything with the PREFIX environment variable. Running "PREFIX=foo perl Build.PL" results in an empty runtime_params file. Same result running it through Makefile.PL. Can you provide some code to replicate? Show quoted text
> Further, since both --prefix and PREFIX might potentially be relative > paths, and the result of an install would be bizarre to say the least, > the use of relative paths in --prefix or PREFIX should be fatal (for > some definition of fatal)
They should probably DWIM and turn themselves into absolute paths from the current working directory.
Subject: Re: [rt.cpan.org #22880] --prefix is incompatible with "export PREFIX"
Date: Mon, 24 Sep 2007 19:04:35 +1000
To: bug-Module-Build [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
The --prefix is used during "perl Build.PL" and I believe PREFIX is ignored, however at ./Build time it IS used. Adam K On 24/09/2007, Michael G Schwern via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> > > <URL: http://rt.cpan.org/Ticket/Display.html?id=22880 > > > On Mon Nov 06 23:45:20 2006, ADAMK wrote:
> > In the most common use case, Module::Build is passed a --prefix value by > > CPAN.pm which it should continue to use as it runs. > > > > However, if the PREFIX environment variable exists, Module::Build > > initially saves the --prefix value to it's _build/runtime_params file, > > but then when it reloads the files, it overwrites it with PREFIX and > > then saves the broken version back again.
> > I don't think Module::Build does anything with the PREFIX environment > variable. Running "PREFIX=foo perl Build.PL" results in an empty > runtime_params file. Same result running it through Makefile.PL. > > Can you provide some code to replicate? > >
> > Further, since both --prefix and PREFIX might potentially be relative > > paths, and the result of an install would be bizarre to say the least, > > the use of relative paths in --prefix or PREFIX should be fatal (for > > some definition of fatal)
> > They should probably DWIM and turn themselves into absolute paths from > the current working directory. > >
On Mon Sep 24 05:05:46 2007, adamkennedybackup@gmail.com wrote: Show quoted text
> The --prefix is used during "perl Build.PL" and > I believe PREFIX is ignored, however at ./Build >time it IS used.
I can't replicate this behavior or see anywhere in the code (or history of the code) that would cause it. M::B doesn't appear to have ever referenced $ENV{PREFIX}.