From 9a89f745ed13e05507dd5297fa4a860c4fdc2b2e Mon Sep 17 00:00:00 2001 From: James Troup Date: Tue, 14 May 2002 15:28:53 +0000 Subject: [PATCH] Suite::%s::{Architectures,Components}, OverrideType, Section, Location::%s::Suites and Urgency::Valid become ValueLists not Lists. --- alyson | 8 ++++---- andrea | 4 ++-- cindy | 4 ++-- claire.py | 4 ++-- denise | 6 +++--- neve | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/alyson b/alyson index 62d98723..c26273f6 100755 --- a/alyson +++ b/alyson @@ -2,7 +2,7 @@ # Sync the ISC configuartion file and the SQL database # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: alyson,v 1.8 2002-05-03 16:06:45 troup Exp $ +# $Id: alyson,v 1.9 2002-05-14 15:28:53 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 @@ -111,7 +111,7 @@ def main (): description = get(Suite, "Description"); projectB.query("INSERT INTO suite (suite_name, version, origin, description) VALUES ('%s', %s, %s, %s)" % (string.lower(suite), version, origin, description)); - for architecture in Cnf.SubTree("Suite::%s::Architectures" % (suite)).List(): + for architecture in Cnf.ValueList("Suite::%s::Architectures" % (suite)): architecture_id = db_access.get_architecture_id (architecture); if architecture_id < 0: utils.fubar("architecture '%s' not found in architecture table for suite %s." % (architecture, suite)); @@ -122,7 +122,7 @@ def main (): projectB.query("BEGIN WORK"); projectB.query("DELETE FROM override_type"); - for type in Cnf.SubTree("OverrideType").List(): + for type in Cnf.ValueList("OverrideType"): projectB.query("INSERT INTO override_type (type) VALUES ('%s')" % (type)); projectB.query("COMMIT WORK"); @@ -152,7 +152,7 @@ def main (): suffix = '/' + component; else: suffix = ""; - for section in Cnf.SubTree("Section").List(): + for section in Cnf.ValueList("Section"): projectB.query("INSERT INTO section (section) VALUES ('%s%s%s')" % (prefix, section, suffix)); projectB.query("COMMIT WORK"); diff --git a/andrea b/andrea index 5c32e3ae..4d2894e9 100755 --- a/andrea +++ b/andrea @@ -2,7 +2,7 @@ # Check for fixable discrepancies between stable and unstable # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: andrea,v 1.6 2002-05-03 16:06:45 troup Exp $ +# $Id: andrea,v 1.7 2002-05-14 15:28:53 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 (): arch_all_id = db_access.get_architecture_id("all"); dsc_type_id = db_access.get_override_type_id("dsc"); - for arch in Cnf.SubTree("Suite::%s::Architectures" % (src_suite)).List(): + for arch in Cnf.ValueList("Suite::%s::Architectures" % (src_suite)): if arch == "source": continue; diff --git a/cindy b/cindy index 022a5582..fe2e7272 100755 --- a/cindy +++ b/cindy @@ -2,7 +2,7 @@ # Output override files for apt-ftparchive and indices/ # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: cindy,v 1.8 2002-05-03 16:06:45 troup Exp $ +# $Id: cindy,v 1.9 2002-05-14 15:28:53 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 (): for component in Cnf.SubTree("Component").List(): if component == "mixed": continue; # Ick - for type in Cnf.SubTree("OverrideType").List(): + for type in Cnf.ValueList("OverrideType"): print "Processing %s [%s - %s]..." % (suite, component, type); process(suite, component, type); diff --git a/claire.py b/claire.py index cf47f172..e6681a5b 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, 2002 James Troup -# $Id: claire.py,v 1.13 2002-05-08 11:13:02 troup Exp $ +# $Id: claire.py,v 1.14 2002-05-14 15:28:53 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 @@ -113,7 +113,7 @@ UNION SELECT DISTINCT ON (f.id) null, sec.section, l.path, f.filename, f.id dislocated_files[i[4]] = dest; # Binary - architectures = Cnf.SubTree("Suite::Stable::Architectures").List(); + architectures = Cnf.ValueList("Suite::Stable::Architectures"); for arch in [ "source", "all" ]: if architectures.count(arch): architectures.remove(arch); diff --git a/denise b/denise index a1349357..3c702dae 100755 --- a/denise +++ b/denise @@ -2,7 +2,7 @@ # Output override files for apt-ftparchive and indices/ # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: denise,v 1.10 2002-05-08 11:13:02 troup Exp $ +# $Id: denise,v 1.11 2002-05-14 15:28:53 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 @@ -90,7 +90,7 @@ def main (): for component in Cnf.SubTree("Component").List(): if component == "mixed": continue; # Ick - for type in Cnf.SubTree("OverrideType").List(): + for type in Cnf.ValueList("OverrideType"): if type == "deb": override_type = ""; elif type == "udeb": @@ -116,7 +116,7 @@ def main (): if component == "mixed": continue; component_id = db_access.get_component_id(component); - for type in Cnf.SubTree("OverrideType").List(): + for type in Cnf.ValueList("OverrideType"): if type == "deb": override_type = ""; q = projectB.query("SELECT DISTINCT b.package FROM bin_associations ba, binaries b, files f, location l WHERE ba.suite = %s AND l.component = %s AND ba.bin = b.id AND b.file = f.id AND f.location = l.id" % (suite_id, component_id)); diff --git a/neve b/neve index b29e5a53..15883947 100755 --- a/neve +++ b/neve @@ -2,7 +2,7 @@ # Populate the DB # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: neve,v 1.9 2002-05-08 11:18:24 troup Exp $ +# $Id: neve,v 1.10 2002-05-14 15:28:53 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 @@ -309,7 +309,7 @@ def update_suites (): for i in ("Version", "Origin", "Description"): if SubSec.has_key(i): projectB.query("UPDATE suite SET %s = '%s' WHERE suite_name = '%s'" % (string.lower(i), SubSec[i], string.lower(suite))) - for architecture in Cnf.SubTree("Suite::%s::Architectures" % (suite)).List(): + for architecture in Cnf.ValueList("Suite::%s::Architectures" % (suite)): architecture_id = db_access.get_architecture_id (architecture); projectB.query("INSERT INTO suite_architectures (suite, architecture) VALUES (currval('suite_id_seq'), %d)" % (architecture_id)); @@ -566,9 +566,9 @@ def main (): print 'Processing '+location+'...'; process_packages (location, packages, suite, "", server); elif type == "legacy": - for suite in Cnf.SubTree("Location::%s::Suites" % (location)).List(): + for suite in Cnf.ValueList("Location::%s::Suites" % (location)): for component in Cnf.SubTree("Component").List(): - for architecture in Cnf.SubTree("Suite::%s::Architectures" % (suite)).List(): + for architecture in Cnf.ValueList("Suite::%s::Architectures" % (suite)): if architecture == "source" or architecture == "all": continue; packages = location + Cnf.Find("Suite::%s::CodeName" % (suite)) + '/' + component + '/binary-' + architecture + '/Packages' -- 2.39.5