From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RxpTO-0001He-Qv for garchives@archives.gentoo.org; Thu, 16 Feb 2012 00:45:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 740D9E0C47; Thu, 16 Feb 2012 00:38:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AE15FE0AC7 for ; Thu, 16 Feb 2012 00:28:10 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37C4E1B405B for ; Thu, 16 Feb 2012 00:28:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CE7D8E542B for ; Thu, 16 Feb 2012 00:28:06 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1329350127.2e92212e93e218cc6a449a744941fe0f3c798831.kent@gentoo> Subject: [gentoo-commits] proj/perl-overlay:eclass-moretests commit in: eclass/ X-VCS-Repository: proj/perl-overlay X-VCS-Files: eclass/perl-module.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kent X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: 2e92212e93e218cc6a449a744941fe0f3c798831 X-VCS-Branch: eclass-moretests Date: Thu, 16 Feb 2012 00:28:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 6eb9c28b-1381-4cab-92e1-2326612ab410 X-Archives-Hash: 09ee3d9a5902df6edbc4cb601c02f381 commit: 2e92212e93e218cc6a449a744941fe0f3c798831 Author: Kent Fredric gmail com> AuthorDate: Wed Feb 15 23:55:27 2012 +0000 Commit: Kent Fredric gmail com> CommitDate: Wed Feb 15 23:55:27 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/perl-overlay.= git;a=3Dcommit;h=3D2e92212e [eclass] Add a completely untested diagnostics routine to perl-module.ecl= ass --- 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=3D"yes" pm_echovar=3D"" perlinfo_done=3Dfalse =20 +perl_diagfile() { + echo "${T}/perl-diagnostics.log" +} + +perl_diagnostics() { + local d; + d=3D$( 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=3D\|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 re= port"; + die "$@" +} perl-module_src_unpack() { debug-print-function $FUNCNAME "$@" base_src_unpack