Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] make non-zero exit from Makefile.PL fatal in make_ext.pl #15001

Closed
p5pRT opened this issue Oct 20, 2015 · 5 comments
Closed

[PATCH] make non-zero exit from Makefile.PL fatal in make_ext.pl #15001

p5pRT opened this issue Oct 20, 2015 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 20, 2015

Migrated from rt.perl.org#126412 (status was 'resolved')

Searchable as RT126412$

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2015

From @bulk88

See attached patch. This is related to thread http​://www.nntp.perl.org/group/perl.perl5.porters/2015/10/msg231903.html
 

@p5pRT
Copy link
Author

p5pRT commented Oct 20, 2015

From @bulk88

0001-make-non-zero-exit-from-Makefile.PL-fatal-in-make_ex.patch
From 054bf91927547b61fa02eaa3673304b3e6416545 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 20 Oct 2015 18:03:45 -0400
Subject: [PATCH] make non-zero exit from Makefile.PL fatal in make_ext.pl

A non-zero exit is fatal according to
http://www.nntp.perl.org/group/perl.qa/2008/08/msg11236.html so do not
continue building even if a Makefile was generated (an END block or code
after WriteMakefile() could have died for example).

This patch is from trying to fix problems in this thread
http://www.nntp.perl.org/group/perl.perl5.porters/2015/10/msg231903.html
---
 make_ext.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/make_ext.pl b/make_ext.pl
index f6d9e0f..223f67e 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -520,7 +520,11 @@ EOM
 	   local $ENV{PERL_MM_USE_DEFAULT} = 1;
 	    system $perl, @args;
 	};
-	warn "$code from $ext_dir\'s Makefile.PL" if $code;
+	if($code != 0){
+	    #make sure next build attempt/run of make_ext.pl doesn't succeed
+	    _unlink($makefile);
+	    die "Unsuccessful Makefile.PL($ext_dir): code=$code";
+	}
 
 	# Right. The reason for this little hack is that we're sitting inside
 	# a program run by ./miniperl, but there are tasks we need to perform
-- 
1.9.5.msysgit.1

@p5pRT
Copy link
Author

p5pRT commented Oct 21, 2015

From @tonycoz

On Tue Oct 20 15​:03​:41 2015, bulk88 wrote​:

See attached patch. This is related to thread
http​://www.nntp.perl.org/group/perl.perl5.porters/2015/10/msg231903.html

Thanks, applied as b5f7915.

Tony

@p5pRT
Copy link
Author

p5pRT commented Oct 21, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 21, 2015

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant