Sorry for the hassle, I think I was under the impression that NetAddr::IP
has been in Perl core since ancient times. :-)

On Wed, Nov 22, 2023 at 11:17:08AM +0000, 
[email protected] wrote:
> https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8196
> 
>             Bug ID: 8196
>            Summary: cpanm install fails when NetAddr::IP is not installed
>            Product: Spamassassin
>            Version: SVN Trunk (Latest Devel Version)
>           Hardware: All
>                 OS: All
>             Status: NEW
>           Severity: major
>           Priority: P2
>          Component: Building & Packaging
>           Assignee: [email protected]
>           Reporter: [email protected]
>   Target Milestone: Undefined
> 
> On a system that does not have NetAddr::IP installed, using cpanm to install
> Mail::SpamAssassin from a release tarball generated from trunk fails with an
> error that NetAdddr::IP cannot be found in INC.
> 
> This does not happen installing 4.0.0, which instead successfully runs
> Makefile.PL and then proceeds to install all required modules, including
> NetAddr::IP.
> 
> This bug is an unintended side effect of revision 1909909 which added a use
> NetAddr::IP to Util.pm. Before that commit, Util checked in an eval at runtime
> if the NetAddr::IP exists and conditionally required it, in a code path which
> is not run during the execution of Makefile.PL.
> 
> Makefile.PL runs a function from DepencyInfo.pm which uses Util. The change 
> has
> introduced a dependency on NetAddr::IP before cpanm gets the list of required
> modules that is generated by running Makefile.PL.
> 
> The fix is to place NetAddr::IP in the configure_requires list, which is the
> list of modules that cpan looks at to find and install those that Makefile.PL
> needs to run.
> 
> Because of an ambiguity in the cpan module specs, it still needs to be in the
> runtime required list too, to ensure that it is not loaded temporarily only at
> build time.
> 
> -- 
> You are receiving this mail because:
> You are the assignee for the bug.

Reply via email to