From 69546c1e264e3333b49830c8f80dc8ab025929f0 Mon Sep 17 00:00:00 2001 From: James Troup Date: Mon, 27 Nov 2000 03:15:26 +0000 Subject: [PATCH] auric fixes --- TODO | 22 ++++++++++++---------- db_access.py | 6 +++++- katie | 12 ++++++++---- utils.py | 4 ++-- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/TODO b/TODO index 4f1daf86..f5b7e87f 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ Show Stopper ------------ o finish new cron.daily file - o pg_dump & friends. o finish rhona @@ -16,18 +15,18 @@ Non-Show Stopper o CD building scripts need fixing - o need a way to sync katie.conf and the DB for things like architecture - o need a poolifier that will poolify X mb a day.. (catherine) - - o Optimize all the queries by using EXAMINE and building some INDEXs - o Need CIPE tunnel for pandora<->auric setup. [Culus] (?) + o charisma needs to do version compares + + o Optimize all the queries by using EXAMINE and building some INDEXs. + o enclose all the setting SQL stuff in transactions (mostly done). - o enclose all the setting SQL stuff in transactions + o ?assumes running in incoming? [needs to be runnable in p-u too] + o changelog udpate stuff for point releases. - o ?assumes running in incoming? ?problem? + == - o project/orphaned should be a timed dist so that things only stay - in there temporarily (say 3 months) [aj] + o need a poolifier that will poolify X mb a day.. (catherine) + o Need to merge non-non-US and non-US DBs. == @@ -35,6 +34,7 @@ Non-Show Stopper o ability to rebuild all other tables from dists _or_ pools (in the event of disaster) (?) o check errors on apt_pkg calls so we don't bomb out on daily runs (?) o check to see if mutli-component binary packages from a single component source are supported + o need a way to sync katie.conf and the DB for things like architecture =================================================================================================== @@ -49,6 +49,8 @@ Packaging TODO Future Enhancements ------------------- + o project/orphaned should be a timed dist so that things only stay + in there temporarily (say 3 months) [aj] o make the --help and --version options do stuff for all scripts o check for .dsc when source is mentioneD? o fix parse_changes()/build_file_list() to sanity check filenames diff --git a/db_access.py b/db_access.py index a9fd1d1a..0538971d 100644 --- a/db_access.py +++ b/db_access.py @@ -1,6 +1,6 @@ # DB access fucntions # Copyright (C) 2000 James Troup -# $Id: db_access.py,v 1.1.1.1 2000-11-24 00:20:09 troup Exp $ +# $Id: db_access.py,v 1.2 2000-11-27 03:15:26 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 @@ -44,6 +44,10 @@ def get_suite_id (suite): return suite_id_cache[suite] q = projectB.query("SELECT id FROM suite WHERE suite_name = '%s'" % (suite)) + ql = q.getresult(); + if ql == []: + return -1; + suite_id = q.getresult()[0][0] suite_id_cache[suite] = suite_id diff --git a/katie b/katie index dee7a971..7ed5dc00 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packaes # Copyright (C) 2000 James Troup -# $Id: katie,v 1.3 2000-11-26 16:35:41 troup Exp $ +# $Id: katie,v 1.4 2000-11-27 03:15:26 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 @@ -108,7 +108,7 @@ def usage (exit_code): def check_signature (filename): global reject_message - (result, output) = commands.getstatusoutput("gpg --emulate-md-encode-bug --batch --no-options --no-default-keyring --always-trust --load-extension rsaref --keyring=%s --keyring=%s < %s >/dev/null" % (Cnf["Dinstall::PGPKeyring"], Cnf["Dinstall::GPGKeyring"], filename)) + (result, output) = commands.getstatusoutput("gpg --emulate-md-encode-bug --batch --no-options --no-default-keyring --always-trust --keyring=%s --keyring=%s < %s >/dev/null" % (Cnf["Dinstall::PGPKeyring"], Cnf["Dinstall::GPGKeyring"], filename)) if (result != 0): reject_message = "Rejected: GPG signature check failed on `%s'.\n%s\n" % (filename, output) return 0 @@ -133,6 +133,10 @@ def read_override_file (filename, suite, component): def in_override_p (package, component, suite): global overrides; + # Avoid on unknown distributions + if db_access.get_suite_id(suite) == -1: + return None; + # FIXME: nasty non-US speficic hack if string.lower(component[:7]) == "non-us/": component = component[7:]; @@ -823,8 +827,8 @@ def announce (short_summary, action): summary = "" for dist in changes["distribution"].keys(): - list = Cnf["Suite::%s::Announce" % (dist)] - if lists_done.has_key(list): + list = Cnf.Find("Suite::%s::Announce" % (dist)) + if list == None or lists_done.has_key(list): continue lists_done[list] = 1 summary = summary + "Announcing to %s\n" % (list) diff --git a/utils.py b/utils.py index 57a2cdba..40e36cd9 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ # Utility functions # Copyright (C) 2000 James Troup -# $Id: utils.py,v 1.3 2000-11-26 16:35:41 troup Exp $ +# $Id: utils.py,v 1.4 2000-11-27 03:15:26 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 @@ -232,7 +232,7 @@ def where_am_i (): res = socket.gethostbyaddr(socket.gethostname()); if res[0] == 'pandora.debian.org': return 'non-US'; - elif res[1] == 'auric.debian.org': + elif res[0] == 'auric.debian.org': return 'ftp-master'; else: raise unknown_hostname_exc, res; -- 2.39.5