Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386685 - perl-module.eclass: Add a warning if a ./Build script is found in the EU::MM case
Summary: perl-module.eclass: Add a warning if a ./Build script is found in the EU::MM ...
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: perl-eclass 385621
  Show dependency tree
 
Reported: 2011-10-10 19:09 UTC by Torsten Veller (RETIRED)
Modified: 2017-01-20 22:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
warn if a Build file exists in the EU::MM case (Build.patch,679 bytes, text/plain)
2011-10-10 19:10 UTC, Torsten Veller (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
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.