X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=neve;h=a5ca0d17e605703300c57919cedae997fef1d0df;hb=190b6de9debdd6acaf38c180c42275ac76a90e61;hp=b2a51b99b9c9a127d1d0a301f0694c8f28623d24;hpb=d52ebffcc7af210985d90ffc58e7ecc4141dd8a8;p=dak.git diff --git a/neve b/neve index b2a51b99..a5ca0d17 100755 --- a/neve +++ b/neve @@ -2,7 +2,7 @@ # Populate the DB # Copyright (C) 2000, 2001 James Troup -# $Id: neve,v 1.2 2001-03-02 02:24:33 troup Exp $ +# $Id: neve,v 1.4 2001-06-22 22:53:14 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -295,8 +295,7 @@ def do_sources(location, prefix, suite, component, server): sources = location + prefix + 'Sources.gz'; (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (sources, temp_filename)); if (result != 0): - sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output)); - sys.exit(result); + utils.fubar("Gunzip invocation failed!\n%s" % (output), result); print 'Processing '+sources+'...'; process_sources (location, temp_filename, suite, component, server); os.unlink(temp_filename); @@ -317,7 +316,7 @@ def main (): sys.exit(2) print output - projectB = pg.connect('projectb', 'localhost', -1, None, None, 'postgres') + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, 'postgres') db_access.init (Cnf, projectB); @@ -358,8 +357,7 @@ def main (): # prefix = component + '/' # do_sources(location, prefix); else: - sys.stderr.write("Unknown location type ('%s').\n" % (type)); - sys.exit(2); + utils.fubar("Unknown location type ('%s')." % (type)); # Process Packages files to populate `binaries' and friends @@ -412,8 +410,7 @@ def main (): (result, output) = commands.getstatusoutput("psql projectb < add_constraints.sql"); print output if (result != 0): - sys.stderr.write("psql invocation failed!\n"); - sys.exit(result); + utils.fubar("psql invocation failed!\n%s" % (output), result); return;