Skip Menu |

This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id: 5903
Status: resolved
Priority: 0/
Queue: ExtUtils-Install

People
Owner: yves [...] cpan.org
Requestors: jand [...] ActiveState.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: Reduce ExtUtils::Install verbosity
I've been looking at the diffs between the latest ActivePerl release and the standard Perl distribution and found a number of changes that should be integrated back, in my opinion. Most of them reduce the amount of "informational" messages printed out during normal usage. These messages often crowd out actual errors, so new users don't recognize when something actually requires their attention. The attached first patch suppresses some logging from ExtUtils::Install. The MakeMaker tests rely on these messages, so we call them with `make install VERBINST=1`. The patch also modifies the architecture string written by `make ppd` to include the Perl version number for Perl 5.8 and later to differentiate between binary incompatible versions. All diffs are against Perl 5.8.3, but apply against perl-current with offsets. Cheers, -Jan --- lib/ExtUtils/Install.pm~ Mon Mar 22 16:02:25 2004 +++ lib/ExtUtils/Install.pm Mon Mar 22 16:04:01 2004 @@ -205,7 +205,7 @@ if ($pack{'write'}) { $dir = install_rooted_dir(dirname($pack{'write'})); mkpath($dir,0,0755) unless $nonono; - print "Writing $pack{'write'}\n"; + print "Writing $pack{'write'}\n" if $verbose; $packlist->write(install_rooted_file($pack{'write'})) unless $nonono; } } @@ -370,7 +370,7 @@ } # if not verbose, we just say nothing } else { - print "Unlinking $targetfile (shadowing?)\n"; + print "Unlinking $targetfile (shadowing?)\n" if $verbose; forceunlink($targetfile); } } --- lib/ExtUtils/MM_Unix.pm~ Mon Mar 22 16:02:25 2004 +++ lib/ExtUtils/MM_Unix.pm Mon Mar 22 16:04:01 2004 @@ -3357,7 +3357,14 @@ } - $ppd_xml .= sprintf <<'PPD_OUT', $Config{archname}; + + my $archname = $Config{archname}; + if ($^V ge v5.8) { +# archname did not change from 5.6 to 5.8, but those versions may not be not +binary compatible +# so now we append the part of the version that changes when binary +compatibility may change + $archname .= "-". substr($Config{version},0,3); + } + $ppd_xml .= sprintf <<'PPD_OUT', $archname; <OS NAME="$(OSNAME)" /> <ARCHITECTURE NAME="%s" /> PPD_OUT --- lib/ExtUtils/t/basic.t~ Mon Mar 22 16:02:26 2004 +++ lib/ExtUtils/t/basic.t Mon Mar 22 16:04:02 2004 @@ -96,7 +96,13 @@ ' <DEPENDENCY>' ); like( $ppd_html, qr{^\s*<OS NAME="$Config{osname}" />}m, ' <OS>' ); -like( $ppd_html, qr{^\s*<ARCHITECTURE NAME="$Config{archname}" />}m, +my $archname = $Config{archname}; +if ($^V ge v5.8) { +# archname did not change from 5.6 to 5.8, but those versions may not be not +binary compatible +# so now we append the part of the version that changes when binary +compatibility may change + $archname .= "-". substr($Config{version},0,3); +} +like( $ppd_html, qr{^\s*<ARCHITECTURE NAME="$archname" />}m, ' <ARCHITECTURE>'); like( $ppd_html, qr{^\s*<CODEBASE HREF="" />}m, ' <CODEBASE>'); like( $ppd_html, qr{^\s*</IMPLEMENTATION>}m, ' </IMPLEMENTATION>'); @@ -118,7 +124,7 @@ diag $test_out; -my $install_out = run("$make install"); +my $install_out = run("$make install VERBINST=1"); is( $?, 0, 'install' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -138,7 +144,7 @@ SKIP: { skip "VMS install targets do not preserve $(PREFIX)", 8 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere"); + $install_out = run("$make install VERBINST=1 PREFIX=elsewhere"); is( $?, 0, 'install with PREFIX override' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -157,7 +163,7 @@ SKIP: { skip "VMS install targets do not preserve $(DESTDIR)", 10 if $Is_VMS; - $install_out = run("$make install PREFIX= DESTDIR=other"); + $install_out = run("$make install VERBINST=1 PREFIX= DESTDIR=other"); is( $?, 0, 'install with DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); @@ -197,7 +203,7 @@ SKIP: { skip "VMS install targets do not preserve $(PREFIX)", 9 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/"); + $install_out = run("$make install VERBINST=1 PREFIX=elsewhere +DESTDIR=other/"); is( $?, 0, 'install with PREFIX override and DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m );
http://www.makemaker.org/wiki/index.cgi?ModulesForSale ExtUtils::Install is set to be moved into its own distribution so I'll just pass the buck along to whomever winds up handling that.
On Sat Apr 03 15:38:00 2004, MSCHWERN wrote: Show quoted text
> I've been looking at the diffs between the latest ActivePerl release > and the > standard Perl distribution and found a number of changes that should > be > integrated back, in my opinion. Most of them reduce the amount of > "informational" messages printed out during normal usage. These > messages > often crowd out actual errors, so new users don't recognize when > something > actually requires their attention.
This report is quite old, can it be closed from the POV of ExtUtils::Install? Quite a bit of effort has gone into both win32 support and how information is reported back to the user. cheers, Yves
This is a stripped down version of the patch (relative to 1.50) that we have had in ActivePerl for a long time. It's an improvement if the "Writing $file" noise for each file installed should only show when verbosity is turned up a bit.
commit a63e76112bd67b2378d5286e129b70306920dc5f Author: Gisle Aas <gisle@aas.no> Date: Wed Jul 16 12:10:33 2008 +0200 Don't print "Writing $file" line for each file unless verbosity is turned on. diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 1b144b5..0b4a390 100755 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -809,7 +809,7 @@ sub install { #XXX OS-SPECIFIC if ($pack{'write'}) { $dir = install_rooted_dir(dirname($pack{'write'})); _mkpath( $dir, 0, 0755, $verbose, $dry_run ); - print "Writing $pack{'write'}\n"; + print "Writing $pack{'write'}\n" if $verbose; $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run; } diff --git a/t/basic.t b/t/basic.t index fbb0d02..603cf68 100755 --- a/t/basic.t +++ b/t/basic.t @@ -103,7 +103,7 @@ is( $?, 0, ' exited normally' ) || diag $test_out; -my $install_out = run("$make install"); +my $install_out = run("$make install VERBINST=1"); is( $?, 0, 'install' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -129,7 +129,7 @@ ok( $files{'perllocal.pod'},' perllocal.pod created' ); SKIP: { skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere"); + $install_out = run("$make install PREFIX=elsewhere VERBINST=1"); is( $?, 0, 'install with PREFIX override' ) || diag $install_out; like( $install_out, qr/^Installing /m ); like( $install_out, qr/^Writing /m ); @@ -149,7 +149,7 @@ SKIP: { SKIP: { skip 'VMS install targets do not preserve $(DESTDIR)', 11 if $Is_VMS; - $install_out = run("$make install PREFIX= DESTDIR=other"); + $install_out = run("$make install PREFIX= DESTDIR=other VERBINST=1"); is( $?, 0, 'install with DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); @@ -190,7 +190,7 @@ SKIP: { SKIP: { skip 'VMS install targets do not preserve $(PREFIX)', 10 if $Is_VMS; - $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/"); + $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/ VERBINST=1"); is( $?, 0, 'install with PREFIX override and DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m );
Resolved in 1.50_02