-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 29 Jan 2009 21:57:10 +0100
Jan Pazdziora <[email protected]> wrote:

> On Thu, Jan 29, 2009 at 04:01:40PM -0400, Devan Goodwin wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Working on the population of PostgreSQL schema in
> > spacewalk-setup I landed in rhn-populate-database.pl, got the
> > script ready to populate pgsql schema as well but even if the
> > schema population fails miserably, the psql executable returns a
> > 0 success code.
> > 
> > Anyone have ideas for a good way to progrematically check if the
> > population was successful?
> 
> Can't you check back (with select) that whatever is the last
> command in $schema_deploy_file got executed properly? For example,
> that the version of the schema got actually set?

Probably will have to do something like this soon anyhow to check if
pre-existing schema exists.

> 
> > For the record the population code looks like:
> > 
> > my $psql_cmd = "PGPASSWORD=" . $password . " psql -U " .
> > $user . " -h " . $host . " " . $database . " < " .
> > $schema_deploy_file; $pid = open3(gensym, ">&LOGFILE", ">&LOGFILE",
> > $psql_cmd);
> 
> If you use open3, please, please, please, do not join. Two months
> from now we'll be again having a bugzilla when someone has ', or ",
> or & in their password.
> 

Sure thing. Thanks.

Devan


- -- 
  Devan Goodwin <[email protected]>
  Software Engineer     Spacewalk / RHN Satellite
  Halifax, Canada       650.567.9039x79267
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmCGlsACgkQAyHWaPV9my6/SgCgr2OBez+4bJTrRf28pkGH/Q57
uEEAoILnu5Oqw0KUgRI/ZGDwVuftN4r6
=UtZT
-----END PGP SIGNATURE-----

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to