[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-commits
Subject:    [Bricolage-Commits] PostgreSQL "NOTICE" messages are now suppressed.
From:       David Wheeler <wheeler () users ! sourceforge ! net>
Date:       2002-08-30 0:24:35
[Download RAW message or body]

Log Message:
-----------
PostgreSQL "NOTICE" messages are now suppressed. This is true when using
bric_pgimport, make install, and when executing upgrade scripts.

Modified Files:
--------------
    /cvsroot/bricolage/bricolage/bin:
        bric_pgimport
    /cvsroot/bricolage/bricolage/inst:
        db.pl
    /cvsroot/bricolage/bricolage/inst/upgrade/lib:
        bric_upgrade.pm
    /cvsroot/bricolage/bricolage/lib/Bric:
        Changes.pod
["wheeler-200283002435-diff.txt" (wheeler-200283002435-diff.txt)]

Index: bric_pgimport
===================================================================
RCS file: /cvsroot/bricolage/bricolage/bin/bric_pgimport,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- bric_pgimport	10 Jun 2002 17:52:24 -0000	1.9
+++ bric_pgimport	30 Aug 2002 00:24:32 -0000	1.10
@@ -39,6 +39,15 @@
 # Main Program                         #
 #======================================#
 
+# Tell STDERR to ignore PostgreSQL NOTICE messages by forking another Perl to
+# filter them out.
+open STDERR, "| perl -e 'while (<>) { print unless /^NOTICE:  / }'"
+  or die "Cannot pipe STDERR: $!\n";
+
+# This would also work, but we *know* that we have already Perl to work with.
+#open STDERR, "| grep -v '^NOTICE:  '"
+#  or die "Cannot pipe STDERR to grep\n";
+
 # Setup some initial values.
 initialize();
 
@@ -62,6 +71,8 @@
 # Do any cleanup work before exiting.
 clean_up();
 
+
+
 #==============================================================================#
 # Subroutines                          #
 #======================================#
@@ -340,6 +351,9 @@
     }
     print "Done.\n" unless $opt_q;
 
+my $t1 = Benchmark->new;
+my $td = timediff($t1, $t0);
+print "the code took: ", timestr($td), "\n";
     exit;
 }
 
Index: db.pl
===================================================================
RCS file: /cvsroot/bricolage/bricolage/inst/db.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- db.pl	9 Aug 2002 18:09:14 -0000	1.3
+++ db.pl	30 Aug 2002 00:24:32 -0000	1.4
@@ -47,6 +47,15 @@
 die "Failed to switch EUID to $PG->{system_user_uid} ($PG->{system_user}).\n"
     unless $> == $PG->{system_user_uid};
 
+# Tell STDERR to ignore PostgreSQL NOTICE messages by forking another Perl to
+# filter them out.
+open STDERR, "| perl -e 'while (<>) { print unless /^NOTICE:  / }'"
+  or die "Cannot pipe STDERR: $!\n";
+
+# This would also work, but we *know* that we have already Perl to work with.
+#open STDERR, "| grep -v '^NOTICE:  '"
+#  or die "Cannot pipe STDERR to grep\n";
+
 # setup database and user while connected to dummy template1
 my $dbh = db_connect('template1');
 create_db($dbh);
Index: bric_upgrade.pm
===================================================================
RCS file: /cvsroot/bricolage/bricolage/inst/upgrade/lib/bric_upgrade.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- bric_upgrade.pm	20 May 2002 03:21:59 -0000	1.10
+++ bric_upgrade.pm	30 Aug 2002 00:24:32 -0000	1.11
@@ -114,6 +114,16 @@
 $Bric::Util::DBI::dbh = DBI->connect(join(':', 'DBI', DBD_TYPE,
 					  Bric::Util::DBI::DSN_STRING),
 				     $opt_u, $opt_p, $ATTR);
+
+# Tell STDERR to ignore PostgreSQL NOTICE messages by forking another Perl to
+# filter them out.
+open STDERR, "| perl -e 'while (<>) { print unless /^NOTICE:  / }'"
+  or die "Cannot pipe STDERR: $!\n";
+
+# This would also work, but we *know* that we have already Perl to work with.
+#open STDERR, "| grep -v '^NOTICE:  '"
+#  or die "Cannot pipe STDERR to grep\n";
+
 
 =head1 EXPORTED FUNCTIONS
 
Index: Changes.pod
===================================================================
RCS file: /cvsroot/bricolage/bricolage/lib/Bric/Changes.pod,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -w -d -r1.151 -r1.152
--- Changes.pod	29 Aug 2002 19:25:21 -0000	1.151
+++ Changes.pod	30 Aug 2002 00:24:33 -0000	1.152
@@ -43,18 +43,18 @@
 
 =item *
 
-Some media asset events weren't geting logged properly Now they are. [David]
+Some media asset events weren't getting logged properly Now they are. [David]
 
 =item *
 
-Database transactions are now properly maintained whe publishing
+Database transactions are now properly maintained when publishing
 assets. Everything was working, but DBI C<AutoCommit> was getting turned on,
 and this likely slowed some things down a bit. [David]
 
 =item *
 
 Assets can once again be found via the "Find" pages and recalled into a
-worfklow without error. [David]
+workflow without error. [David]
 
 =item *
 
@@ -78,6 +78,14 @@
 All Bricolage F<.pod> files are now installed and converted to C<man> pages
 along with all of the F<.pm> files. [David]
 
+=item *
+
+PostgreSQL "NOTICE" messages are now suppressed during installation. [David]
+
+=item *
+
+Corrected a bunch of spelling errors in this file. [David]
+
 =back
 
 =head1 VERSION 1.3.3
@@ -95,7 +103,7 @@
 =item *
 
 Added support for search Media by category and file name through the SOAP
-inerface and standard API. [Sam]
+interface and standard API. [Sam]
 
 =item *
 
@@ -150,7 +158,7 @@
 =item *
 
 Add support for Apache-SSL. This required a change to the context of the
-F<bricolage.conf> C<ENABLE_SSL> directice to indicate the type of SSL support:
+F<bricolage.conf> C<ENABLE_SSL> directive to indicate the type of SSL support:
 none, apache_ssl, or mod_ssl. [Michael Robinton]
 
 =item *
@@ -180,7 +188,7 @@
 =item *
 
 Added C<get_data()> method to Bric::Util::Grp::Parts::Member::Contrib. This
-method takes a simplar scalar argument and returns the relevant attribute.
+method takes a simpler scalar argument and returns the relevant attribute.
 This bit of syntactic sugar makes contributor objects behave a bit more like
 C<$element> objects in templates, thus simplifying things for template
 developers. [David]
@@ -279,7 +287,7 @@
 
 =item *
 
-Changed strttime instances of '%G' to '%Y' in URI preference, as this seems to
+Changed strftime instances of '%G' to '%Y' in URI preference, as this seems to
 be more portable. [David]
 
 =item *
@@ -369,7 +377,7 @@
 
 =item *
 
-Fixed installer to first ask whether SSL supprt is desired before asking for a
+Fixed installer to first ask whether SSL support is desired before asking for a
 specific SSL module. [Sam]
 
 =item *
@@ -643,7 +651,7 @@
 
 =item *
 
-Fixed button javascript to work correctly in Mozilla. [Matt]
+Fixed button JavaScript to work correctly in Mozilla. [Matt]
 
 =item *
 
@@ -1148,7 +1156,7 @@
 
 =item *
 
-Added ability for differnt Output Channels to function as different component
+Added ability for different Output Channels to function as different component
 roots for in Mason templates. This will allow for templates that can't be found
 in the current Output Channel to be searched for in other Output Channels.
 [David]
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-Commits mailing list
Bricolage-Commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic