public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-16  0:28 Kent Fredric
  0 siblings, 0 replies; 6+ messages in thread
From: Kent Fredric @ 2012-02-16  0:28 UTC (permalink / raw
  To: gentoo-commits

commit:     2e92212e93e218cc6a449a744941fe0f3c798831
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Wed Feb 15 23:55:27 2012 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Wed Feb 15 23:55:27 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=2e92212e

[eclass] Add a completely untested diagnostics routine to perl-module.eclass

---
 eclass/perl-module.eclass |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 4065e76..78c1765 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -75,6 +75,46 @@ PREFER_BUILDPL="yes"
 pm_echovar=""
 perlinfo_done=false
 
+perl_diagfile() {
+	echo "${T}/perl-diagnostics.log"
+}
+
+perl_diagnostics() {
+	local d;
+	d=$( perl_diagfile );
+	echo "perl: $(which perl)" > $d;
+	echo >> $d;
+	if [[ -x $(which grep) && -x $(which env)]]; then
+		echo "interesting ENV values:" >> $d;
+		env | grep "^\(PERL\|HOME=\|MANPATH\|PATH\|TEST\|GENTOO_PERL\)"  \
+			>> $d;
+		echo >> $d;
+	fi
+	if [[ -x $(which perl) ]]; then
+		echo "perl -V : " >> $d;
+		echo >> $d;
+		perl -V 2>&1 >> $d
+		echo >> $d
+		if [[ -x $(which perl-info) ]]; then
+			echo "perl-info output: " >> $d;
+			echo >> $d;
+			perl-info >> $d;
+			echo >> $d;
+		fi
+		echo "Corelist Versions: " >> $d;
+		echo >> $d;
+		perl -MModule::CoreList -e 'for $mod ( Module::CoreList->find_modules(qr/^/) ) {
+			eval "require $mod; print q[$mod : ] . \$${mod}::VERSION . qq[\n]; 1" or print qq{\e[31mNA: $mod\e[0m\n};
+		}' >> $d;
+	fi
+}
+
+perl_fatal_error() {
+	debug-print-function $FUNCNAME "$@"
+	perl_diagnostics();
+	eerror "Please attach the contents of $(perl_diagfile) with your bug report";
+	die "$@"
+}
 perl-module_src_unpack() {
 	debug-print-function $FUNCNAME "$@"
 	base_src_unpack



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-16  0:28 Kent Fredric
  0 siblings, 0 replies; 6+ messages in thread
From: Kent Fredric @ 2012-02-16  0:28 UTC (permalink / raw
  To: gentoo-commits

commit:     d48aaf19f23447d4fb28b2b6e88fd7b97df36e40
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Thu Feb 16 00:16:24 2012 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Thu Feb 16 00:16:24 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=d48aaf19

Fix a minor logic check, because env is a builtin

---
 eclass/perl-module.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 78c1765..5115b80 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -84,7 +84,7 @@ perl_diagnostics() {
 	d=$( perl_diagfile );
 	echo "perl: $(which perl)" > $d;
 	echo >> $d;
-	if [[ -x $(which grep) && -x $(which env)]]; then
+	if [[ -x $(which grep) ]]; then
 		echo "interesting ENV values:" >> $d;
 		env | grep "^\(PERL\|HOME=\|MANPATH\|PATH\|TEST\|GENTOO_PERL\)"  \
 			>> $d;



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-16  3:16 Kent Fredric
  0 siblings, 0 replies; 6+ messages in thread
From: Kent Fredric @ 2012-02-16  3:16 UTC (permalink / raw
  To: gentoo-commits

commit:     f00eeb3b89dc0650dcd2e1d7dacde633f49234f6
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Thu Feb 16 02:43:57 2012 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Thu Feb 16 02:43:57 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=f00eeb3b

replace die calls with perl_fatal_error to force the display of a custom message on perl-related exceptions

---
 eclass/perl-module.eclass |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 5115b80..22c8543 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -111,7 +111,7 @@ perl_diagnostics() {
 
 perl_fatal_error() {
 	debug-print-function $FUNCNAME "$@"
-	perl_diagnostics();
+	perl_diagnostics;
 	eerror "Please attach the contents of $(perl_diagfile) with your bug report";
 	die "$@"
 }
@@ -158,7 +158,7 @@ perl-module_src_prep() {
 			eqawarn "           Add virtual/perl-Module-Build to DEPEND!"
 			if [[ -n ${PERLQAFATAL} ]]; then
 				eerror "Bailing out due to PERLQAFATAL=1";
-				die;
+				perl_fatal_error;
 			fi
 		fi
 		set -- \
@@ -169,7 +169,7 @@ perl-module_src_prep() {
 			"${myconf_local[@]}"
 		einfo "perl Build.PL" "$@"
 		perl Build.PL "$@" <<< "${pm_echovar}" \
-				|| die "Unable to build!"
+			|| perl_fatal_error "Unable to build!"
 	elif [[ -f Makefile.PL ]] ; then
 		einfo "Using ExtUtils::MakeMaker"
 		set -- \
@@ -180,7 +180,7 @@ perl-module_src_prep() {
 			"${myconf_local[@]}"
 		einfo "perl Makefile.PL" "$@"
 		perl Makefile.PL "$@" <<< "${pm_echovar}" \
-				|| die "Unable to build!"
+			|| perl_fatal_error "Unable to build!"
 	fi
 	if [[ ! -f Build.PL && ! -f Makefile.PL ]] ; then
 		einfo "No Make or Build file detected..."
@@ -202,14 +202,14 @@ perl-module_src_compile() {
 
 	if [[ -f Build ]] ; then
 		./Build build \
-			|| die "Compilation failed"
+			|| perl_fatal_error "Compilation failed"
 	elif [[ -f Makefile ]] ; then
 		set -- \
 			OTHERLDFLAGS="${LDFLAGS}" \
 			"${mymake_local[@]}"
 		einfo "emake" "$@"
 		emake "$@" \
-			|| die "Compilation failed"
+			|| perl_fatal_error "Compilation failed"
 #			OPTIMIZE="${CFLAGS}" \
 	fi
 }
@@ -311,9 +311,9 @@ perl-module_src_test() {
 		fi
 		${perlinfo_done} || perl_set_version
 		if [[ -f Build ]] ; then
-			./Build test verbose=${TEST_VERBOSE:-0} || die "test failed"
+			./Build test verbose=${TEST_VERBOSE:-0} || perl_fatal_error "test failed"
 		elif [[ -f Makefile ]] ; then
-			emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || die "test failed"
+			emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || perl_fatal_error "test failed"
 		else
 			ewarn "No ./Build or ./Makefile, can not run tests"
 		fi
@@ -343,10 +343,10 @@ perl-module_src_install() {
 
 	if [[ -f Build ]] ; then
 		./Build ${mytargets} \
-			|| die "./Build ${mytargets} failed"
+			|| perl_fatal_error "./Build ${mytargets} failed"
 	elif [[ -f Makefile ]] ; then
 		emake "${myinst_local[@]}" ${mytargets} \
-			|| die "emake ${myinst_local[@]} ${mytargets} failed"
+			|| perl_fatal_error "emake ${myinst_local[@]} ${mytargets} failed"
 	fi
 
 	perl_delete_module_manpages



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-16  4:11 Kent Fredric
  0 siblings, 0 replies; 6+ messages in thread
From: Kent Fredric @ 2012-02-16  4:11 UTC (permalink / raw
  To: gentoo-commits

commit:     5eaae8ce158ced41542b52875a536d228f4e29ee
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Thu Feb 16 04:11:43 2012 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Thu Feb 16 04:11:43 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=5eaae8ce

[perl-module.eclass] work around the absolutely insane failure handling system EAPI4 introduces

---
 eclass/perl-module.eclass |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 22c8543..bdda699 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -109,10 +109,37 @@ perl_diagnostics() {
 	fi
 }
 
+perl_nonfatal() {
+	# This is an awful hack because
+	#  a) EAPI <4 are fatal
+	#  b) EAPI >4 are nonfatal
+	#  c) There's no way to get EAPI<4 behaviour without the 'nonfatal' pragma
+	#  d) The 'nonfatal' pragma is banned from EAPI<4
+	#  e) The underlying implementation of the nonfatal pragma is PM Specific
+	#		* Portage uses PORAGE_FATAL=1
+	#		* Paludis uses PALUDIS_FAILURE_IS_NONFATAL=yes
+	#  f) Arrrghh.
+	#     -- kentfredric@gmail.com
+	local exitcond
+	if has "${EAPI:-0}" 0 1 2 3 3_pre2 ; then
+		if [[ $# -lt 1 ]]; then
+			die "$FUNCNAME(): Missing argument"
+		fi
+		"$@"
+		return $?
+	fi
+	nonfatal "$@"
+}
+
 perl_fatal_error() {
 	debug-print-function $FUNCNAME "$@"
 	perl_diagnostics;
-	eerror "Please attach the contents of $(perl_diagfile) with your bug report";
+	eerror "-- Gentoo Perl Team Specific Bug reporting request -- "
+	eerror ""
+	eerror "Please attach the contents of the following file with your bug report:";
+	eerror ""
+	eerror "  $(perl_diagfile)"
+	eerror ""
 	die "$@"
 }
 perl-module_src_unpack() {
@@ -208,7 +235,7 @@ perl-module_src_compile() {
 			OTHERLDFLAGS="${LDFLAGS}" \
 			"${mymake_local[@]}"
 		einfo "emake" "$@"
-		emake "$@" \
+		perl_nonfatal emake "$@" \
 			|| perl_fatal_error "Compilation failed"
 #			OPTIMIZE="${CFLAGS}" \
 	fi
@@ -313,7 +340,7 @@ perl-module_src_test() {
 		if [[ -f Build ]] ; then
 			./Build test verbose=${TEST_VERBOSE:-0} || perl_fatal_error "test failed"
 		elif [[ -f Makefile ]] ; then
-			emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || perl_fatal_error "test failed"
+			perl_nonfatal emake test TEST_VERBOSE=${TEST_VERBOSE:-0} || perl_fatal_error "test failed"
 		else
 			ewarn "No ./Build or ./Makefile, can not run tests"
 		fi
@@ -345,7 +372,7 @@ perl-module_src_install() {
 		./Build ${mytargets} \
 			|| perl_fatal_error "./Build ${mytargets} failed"
 	elif [[ -f Makefile ]] ; then
-		emake "${myinst_local[@]}" ${mytargets} \
+		perl_nonfatal emake "${myinst_local[@]}" ${mytargets} \
 			|| perl_fatal_error "emake ${myinst_local[@]} ${mytargets} failed"
 	fi
 



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-16  5:22 Kent Fredric
  0 siblings, 0 replies; 6+ messages in thread
From: Kent Fredric @ 2012-02-16  5:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d0dc16c73eb319addfa7190fa9a06fa8283a34bf
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Thu Feb 16 05:22:17 2012 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Thu Feb 16 05:22:17 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=d0dc16c7

[perl-module.eclass] refactor error message code to show bug report request after the error message by integrating it in the data passed to die()

---
 eclass/perl-module.eclass |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index bdda699..c40cf69 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -133,15 +133,20 @@ perl_nonfatal() {
 
 perl_fatal_error() {
 	debug-print-function $FUNCNAME "$@"
+	local msg;
+	msg="
+
+-- Gentoo Perl Team Specific Bug reporting request --
+
+Please attach the contents of the following file with your bug report:
+
+	$(perl_diagfile)
+
+"
 	perl_diagnostics;
-	eerror "-- Gentoo Perl Team Specific Bug reporting request -- "
-	eerror ""
-	eerror "Please attach the contents of the following file with your bug report:";
-	eerror ""
-	eerror "  $(perl_diagfile)"
-	eerror ""
-	die "$@"
+	die "$@ $msg"
 }
+
 perl-module_src_unpack() {
 	debug-print-function $FUNCNAME "$@"
 	base_src_unpack



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/
@ 2012-02-21 20:16 Torsten Veller
  0 siblings, 0 replies; 6+ messages in thread
From: Torsten Veller @ 2012-02-21 20:16 UTC (permalink / raw
  To: gentoo-commits

commit:     e510256007e637f34deea17effc09ffb56d3cc85
Author:     Torsten Veller <tove <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 11:56:34 2012 +0000
Commit:     Torsten Veller <tove <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 11:56:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=e5102560

Change HOMEPAGE to metacpan.org

---
 eclass/perl-module.eclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index c40cf69..184c764 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -66,7 +66,7 @@ fi
 [[ -z "${SRC_URI}" && -n "${MODULE_AUTHOR}" ]] && \
 	SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
 [[ -z "${HOMEPAGE}" ]] && \
-	HOMEPAGE="http://search.cpan.org/dist/${MY_PN:-${PN}}/"
+	HOMEPAGE="https://metacpan.org/release/${MY_PN:-${PN}}/"
 
 SRC_PREP="no"
 SRC_TEST="skip"



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-21 20:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  4:11 [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/ Kent Fredric
  -- strict thread matches above, loose matches on Subject: below --
2012-02-21 20:16 Torsten Veller
2012-02-16  5:22 Kent Fredric
2012-02-16  3:16 Kent Fredric
2012-02-16  0:28 Kent Fredric
2012-02-16  0:28 Kent Fredric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox