Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 386685

Summary: perl-module.eclass: Add a warning if a ./Build script is found in the EU::MM case
Product: Gentoo Linux Reporter: Torsten Veller (RETIRED) <tove>
Component: EclassesAssignee: Gentoo Perl team <perl>
Status: IN_PROGRESS ---    
Severity: normal CC: avenj, esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 239510, 385621    
Attachments: warn if a Build file exists in the EU::MM case

Description Torsten Veller (RETIRED) gentoo-dev 2011-10-10 19:09:32 UTC
perl-module.eclass currently uses ExtUtils::MakeMaker or Module::Build if it detects the files 
"Makefile.PL" or "Build.PL" during src_configure and 
"Makefile"    or "Build"    during src_compile
( and it prefers the M::B version unless PREFER_BUILDPL is set to "no").

Problem:
- It is file-based. It doesn't remember the decision (from earlier phases).

dev-perl/perl-tk is a EU::MM distribution but also contains an executable "build" script. On case-insensitive filesystem the build process switches from EU::MM during src_configure to M::B during src_compile and unexpected things happen.

We should at least add a warning to src_configure if a "./Build" file is found too. Probably the build process should die in this case.
Comment 1 Torsten Veller (RETIRED) gentoo-dev 2011-10-10 19:10:48 UTC
Created attachment 289479 [details]
warn if a Build file exists in the EU::MM case
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2011-10-23 08:34:07 UTC
And add a PREFER_BUILDPL check to perl-module_src_compile:

@@ -160,17 +188,17 @@ perl-module_src_compile() {                                                                                                                                                                
- if [[ -f Build ]] ; then                                                                          
+ if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile ) && -f Build ]] ; then

and set PREFER_BUILDPL to not "yes" in the ebuild if a non-M::B build file exists.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2017-01-20 22:36:07 UTC
I played around with this a bit, and it's a mess because of the different logic in the phases. 

Let's leave it as is for now, and re-sort the entire decision tree between the different build systems at the EAPI=7 step.