# New Ticket Created by James Keenan # Please include the string: [perl #48036] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=48036 >
The patch attached adds a '--silent' option to Parrot configuration. When this option is provided to Configure.pl, the --verbose, -- verbose-step, --fatal, --fatal-step and --ask options are rendered undefined and therefore superseded. So you will get no output from the configuration steps unless one of the steps fails. This option will be good to have available if, like me, you're working on refactoring/testing the configuration steps. I'll apply it in a few days if there is no objection. Thank you very much. kid51
Index: MANIFEST =================================================================== --- MANIFEST (revision 23331) +++ MANIFEST (working copy) @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools\dev\mk_manifest_and_skip.pl Sat Dec 1 14:55:37 2007 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 2 03:08:58 2007 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. Index: lib/Parrot/Configure/Options/Conf.pm =================================================================== --- lib/Parrot/Configure/Options/Conf.pm (revision 23331) +++ lib/Parrot/Configure/Options/Conf.pm (working copy) @@ -69,6 +69,7 @@ profile sbindir sharedstatedir + silent sysconfdir test verbose @@ -128,6 +129,7 @@ Configure.pl to halt --fatal-step Comma-delimited string of configuration steps which upon failure cause Configure.pl to halt + --silent Don't be verbose, interactive or fatal --nomanicheck Don't check the MANIFEST --languages="list of languages" Specify a list of languages to process Index: lib/Parrot/Configure.pm =================================================================== --- lib/Parrot/Configure.pm (revision 23331) +++ lib/Parrot/Configure.pm (working copy) @@ -221,8 +221,12 @@ my $conf = shift; my $n = 0; # step number - my ( $verbose, $verbose_step, $fatal, $fatal_step, $ask ) = - $conf->options->get(qw( verbose verbose-step fatal fatal-step ask )); + my ( $silent, $verbose, $verbose_step, $fatal, $fatal_step, $ask ); + $silent = $conf->options->get(qw( silent )); + unless ($silent) { + ( $verbose, $verbose_step, $fatal, $fatal_step, $ask ) = + $conf->options->get(qw( verbose verbose-step fatal fatal-step ask )); + } $conf->{log} = []; my %steps_to_die_for = (); @@ -259,6 +263,7 @@ verbose_step => $verbose_step, ask => $ask, n => $n, + silent => $silent, } ); if ( ! defined $rv ) { @@ -383,8 +388,10 @@ } } - print "\n", $step->description, '...'; - print "\n" if $args->{verbose} && $args->{verbose} == 2; + unless ($args->{silent}) { + print "\n", $step->description, '...'; + print "\n" if $args->{verbose} && $args->{verbose} == 2; + } my $ret; # When successful, a Parrot configuration step now returns 1 @@ -405,14 +412,16 @@ # A Parrot configuration step can run successfully, but if it fails to # achieve its objective it is supposed to return an undefined status. if ( $ret ) { - _finish_printing_result( - { - step => $step, - step_name => $step_name, - args => $args, - description => $step->description, - } - ); + unless ($args->{silent}) { + _finish_printing_result( + { + step => $step, + step_name => $step_name, + args => $args, + description => $step->description, + } + ); + } # reset verbose value for the next step $conf->options->set( verbose => $args->{verbose} ); if ($conf->options->get(q{configure_trace}) ) { Index: t/configure/136-auto_inline-02.t =================================================================== --- t/configure/136-auto_inline-02.t (revision 23331) +++ t/configure/136-auto_inline-02.t (working copy) @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 12; use Carp; use lib qw( lib t/configure/testlib ); use_ok('config::init::defaults'); @@ -43,7 +43,7 @@ my $ret = $step->runstep($conf); ok( $ret, "$step_name runstep() returned true value" ); -# pass("Keep Devel::Cover happy"); +pass("Keep Devel::Cover happy"); pass("Completed all tests in $0"); ################### DOCUMENTATION ###################