From 0ae0a3896e77f8e07a43d2a8b368466f4edabedd Mon Sep 17 00:00:00 2001 From: James Troup Date: Tue, 20 Mar 2001 00:28:11 +0000 Subject: [PATCH] Fix database name to be a config option. Fix debian/rules typo. [Ryan Murray] --- TODO | 2 ++ alyson | 4 ++-- andrea | 4 ++-- catherine | 4 ++-- charisma | 4 ++-- cindy | 4 ++-- claire.py | 4 ++-- debian/rules | 2 +- denise | 4 ++-- heidi | 4 ++-- jenna | 5 ++--- katie | 4 ++-- katie.conf | 1 + katie.conf-non-US | 1 + madison | 4 ++-- melanie | 4 ++-- neve | 4 ++-- rhona | 6 +++--- tea | 4 ++-- 19 files changed, 36 insertions(+), 33 deletions(-) diff --git a/TODO b/TODO index 4c35c405..c0642569 100644 --- a/TODO +++ b/TODO @@ -28,6 +28,8 @@ Urgent o Revisit linking of binary->source in install() in katie. + o debian/* assumes arch: all but sql-aptvc.o isn't arch: all. + Less Urgent ----------- diff --git a/alyson b/alyson index 2b55faa2..9801d596 100755 --- a/alyson +++ b/alyson @@ -2,7 +2,7 @@ # Sync the ISC configuartion file and the SQL database # Copyright (C) 2000, 2001 James Troup -# $Id: alyson,v 1.3 2001-03-02 02:24:33 troup Exp $ +# $Id: alyson,v 1.4 2001-03-20 00:28:11 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 @@ -43,7 +43,7 @@ def main (): ('v',"version","Alyson::Options::Version")]; apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); # Quick hack to populate section, priority and bin_type; the rest todo later diff --git a/andrea b/andrea index baa16860..351c9374 100755 --- a/andrea +++ b/andrea @@ -2,7 +2,7 @@ # Check for fixable discrepancies between stable and unstable # Copyright (C) 2000, 2001 James Troup -# $Id: andrea,v 1.2 2001-03-02 02:47:29 troup Exp $ +# $Id: andrea,v 1.3 2001-03-20 00:28:11 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 @@ -46,7 +46,7 @@ def main (): apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); src_suite = "stable"; diff --git a/catherine b/catherine index 35885886..a8815114 100755 --- a/catherine +++ b/catherine @@ -2,7 +2,7 @@ # Poolify (move packages from "legacy" type locations to pool locations) # Copyright (C) 2000, 2001 James Troup -# $Id: catherine,v 1.6 2001-03-02 02:24:33 troup Exp $ +# $Id: catherine,v 1.7 2001-03-20 00:28:11 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 @@ -52,7 +52,7 @@ def main (): apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); poolized_size = 0; diff --git a/charisma b/charisma index a982e443..aeebd81d 100755 --- a/charisma +++ b/charisma @@ -2,7 +2,7 @@ # Generate Maintainers file used by e.g. the Debian Bug Tracking System # Copyright (C) 2000, 2001 James Troup -# $Id: charisma,v 1.5 2001-03-15 01:59:18 troup Exp $ +# $Id: charisma,v 1.6 2001-03-20 00:28:11 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 @@ -83,7 +83,7 @@ def main(): extra_files = apt_pkg.ParseCommandLine(Cnf,[],sys.argv); - projectB = pg.connect('projectb', Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, Cnf["DB::ROUser"]); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, Cnf["DB::ROUser"]); for suite in Cnf.SubTree("Suite").List(): suite = string.lower(suite); diff --git a/cindy b/cindy index fc80afd5..a963ea4c 100755 --- a/cindy +++ b/cindy @@ -2,7 +2,7 @@ # Output override files for apt-ftparchive and indices/ # Copyright (C) 2000, 2001 James Troup -# $Id: cindy,v 1.2 2001-03-02 02:46:02 troup Exp $ +# $Id: cindy,v 1.3 2001-03-20 00:28:11 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 @@ -106,7 +106,7 @@ def main (): ('V',"version","Denise::Options::Version")]; apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); for suite in [ "stable", "unstable" ]: diff --git a/claire.py b/claire.py index c28e1d0a..ac146f0b 100755 --- a/claire.py +++ b/claire.py @@ -2,7 +2,7 @@ # 'Fix' stable to make debian-cd and dpkg -BORGiE users happy # Copyright (C) 2000, 2001 James Troup -# $Id: claire.py,v 1.5 2001-03-02 02:24:33 troup Exp $ +# $Id: claire.py,v 1.6 2001-03-20 00:28:11 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 @@ -156,7 +156,7 @@ def main (): apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); diff --git a/debian/rules b/debian/rules index 94bece0d..eaf640c9 100755 --- a/debian/rules +++ b/debian/rules @@ -36,7 +36,7 @@ binary-indep: checkroot build install -m 755 rhona debian/tmp/usr/bin/da_clean install -m 755 madison debian/tmp/usr/bin/da_chkver install -m 755 natalie.py debian/tmp/usr/bin/da_override - install -m 755 melanie debian/tmp/usr/da_remove + install -m 755 melanie debian/tmp/usr/bin/da_remove install -d -m 755 debian/tmp/usr/lib/python1.5/site-packages/ install -m 644 db_access.py utils.py debian/tmp/usr/lib/python1.5/site-packages/ diff --git a/denise b/denise index a6ebe843..2660e8bb 100755 --- a/denise +++ b/denise @@ -2,7 +2,7 @@ # Output override files for apt-ftparchive and indices/ # Copyright (C) 2000, 2001 James Troup -# $Id: denise,v 1.3 2001-03-02 02:29:00 troup Exp $ +# $Id: denise,v 1.4 2001-03-20 00:28:11 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 @@ -87,7 +87,7 @@ def main (): ('V',"version","Denise::Options::Version")]; apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); natalie.init(); diff --git a/heidi b/heidi index 74a8cb7d..c2f5071b 100755 --- a/heidi +++ b/heidi @@ -2,7 +2,7 @@ # Manipulate suite tags # Copyright (C) 2000, 2001 James Troup -# $Id: heidi,v 1.4 2001-03-02 02:24:33 troup Exp $ +# $Id: heidi,v 1.5 2001-03-20 00:28:11 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 @@ -160,7 +160,7 @@ def main (): file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"],int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); diff --git a/jenna b/jenna index 52b80059..121dee34 100755 --- a/jenna +++ b/jenna @@ -2,7 +2,7 @@ # Generate file list which is then fed to apt-ftparchive to generate Packages and Sources files # Copyright (C) 2000, 2001 James Troup -# $Id: jenna,v 1.6 2001-03-02 02:24:33 troup Exp $ +# $Id: jenna,v 1.7 2001-03-20 00:28:11 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 @@ -140,8 +140,6 @@ def main(): global Cnf, projectB; dislocated_files = {}; - projectB = pg.connect('projectb', 'localhost'); - apt_pkg.init(); Cnf = apt_pkg.newConfiguration(); @@ -157,6 +155,7 @@ def main(): apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); if Cnf["Jenna::Options::Suite"] == "": diff --git a/katie b/katie index 3162b31e..f9a2242c 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000, 2001 James Troup -# $Id: katie,v 1.31 2001-03-14 05:12:53 troup Exp $ +# $Id: katie,v 1.32 2001-03-20 00:28:11 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 @@ -1275,7 +1275,7 @@ def main(): Cnf["Dinstall::Options::Ack-New"] = "" postgresql_user = Cnf["DB::ROUser"]; - projectB = pg.connect('projectb', Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, postgresql_user); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, postgresql_user); db_access.init(Cnf, projectB); diff --git a/katie.conf b/katie.conf index 302d0fbb..e01571cc 100644 --- a/katie.conf +++ b/katie.conf @@ -337,6 +337,7 @@ Dir DB { + Name "projectb"; Host "ftp-master.debian.org"; Port -1; ROUser "nobody"; diff --git a/katie.conf-non-US b/katie.conf-non-US index 4ea1ce6e..7c884c77 100644 --- a/katie.conf-non-US +++ b/katie.conf-non-US @@ -323,6 +323,7 @@ Dir DB { + Name "projectb"; Host "non-us.debian.org"; Port -1; ROUser "nobody"; diff --git a/madison b/madison index 882d74bc..36c0e9a0 100755 --- a/madison +++ b/madison @@ -2,7 +2,7 @@ # 'Fix' stable to make debian-cd and dpkg -BORGiE users happy # Copyright (C) 2000, 2001 James Troup -# $Id: madison,v 1.3 2001-03-02 02:24:33 troup Exp $ +# $Id: madison,v 1.4 2001-03-20 00:28:11 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 @@ -50,7 +50,7 @@ def main (): packages = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, Cnf["DB::ROUser"]); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]), None, None, Cnf["DB::ROUser"]); db_access.init(Cnf, projectB); diff --git a/melanie b/melanie index cad844a6..378e6df2 100755 --- a/melanie +++ b/melanie @@ -2,7 +2,7 @@ # General purpose archive tool for ftpmaster # Copyright (C) 2000, 2001 James Troup -# $Id: melanie,v 1.7 2001-03-02 02:26:17 troup Exp $ +# $Id: melanie,v 1.8 2001-03-20 00:28:11 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 @@ -71,7 +71,7 @@ def main (): arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); Options = Cnf.SubTree("Melanie::Options") - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); # Sanity check options diff --git a/neve b/neve index b2a51b99..7412fc37 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.3 2001-03-20 00:28:11 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 @@ -317,7 +317,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); diff --git a/rhona b/rhona index 9cd6a9a8..c080a71d 100755 --- a/rhona +++ b/rhona @@ -2,7 +2,7 @@ # rhona, cleans up unassociated binary and source packages # Copyright (C) 2000, 2001 James Troup -# $Id: rhona,v 1.12 2001-03-15 22:42:25 troup Exp $ +# $Id: rhona,v 1.13 2001-03-20 00:28:11 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 @@ -246,13 +246,13 @@ SELECT m.id FROM maintainer m def main(): global Cnf, projectB, delete_date; - projectB = pg.connect('projectb', 'localhost'); - apt_pkg.init(); Cnf = apt_pkg.newConfiguration(); apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); + Arguments = [('D',"debug","Rhona::Options::Debug", "IntVal"), ('h',"help","Rhona::Options::Help"), ('n',"no-action","Rhona::Options::No-Action"), diff --git a/tea b/tea index fd9b1e00..9e2b53cd 100755 --- a/tea +++ b/tea @@ -2,7 +2,7 @@ # Sanity check the database # Copyright (C) 2000, 2001 James Troup -# $Id: tea,v 1.7 2001-03-15 00:35:30 troup Exp $ +# $Id: tea,v 1.8 2001-03-20 00:28:11 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 @@ -192,7 +192,7 @@ def main (): ('v',"version","Tea::Options::Version")]; apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); - projectB = pg.connect('projectb', 'localhost'); + projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])); db_access.init(Cnf, projectB); check_md5sums(); -- 2.39.2