# Populate the DB
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: neve,v 1.12 2002-06-08 00:23:35 troup Exp $
+# $Id: neve,v 1.13 2002-06-09 17:33:46 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
projectB.query("INSERT INTO suite_architectures (suite, architecture) VALUES (currval('suite_id_seq'), %d)" % (architecture_id));
def update_override_type():
- projectB.query("BEGIN WORK");
projectB.query("DELETE FROM override_type");
for type in Cnf.ValueList("OverrideType"):
projectB.query("INSERT INTO override_type (type) VALUES ('%s')" % (type));
- projectB.query("COMMIT WORK");
def update_priority():
- projectB.query("BEGIN WORK");
projectB.query("DELETE FROM priority");
for priority in Cnf.SubTree("Priority").List():
projectB.query("INSERT INTO priority (priority, level) VALUES ('%s', %s)" % (priority, Cnf["Priority::%s" % (priority)]));
- projectB.query("COMMIT WORK");
###############################################################################
suite = string.lower(suite);
suite_id = db_access.get_suite_id(suite);
- if suite == 'stable':
- testing_id = db_access.get_suite_id("testing");
try:
file = utils.open_file (filename);
except utils.cant_open_exc:
src_associations_id_serial = src_associations_id_serial + 1;
src_associations_query_cache.write("%d\t%d\t%d\n" % (src_associations_id_serial, suite_id, tmp_source_id))
- # populate 'testing' with a mirror of 'stable'
- if suite == "stable":
- src_associations_id_serial = src_associations_id_serial + 1;
- src_associations_query_cache.write("%d\t%d\t%d\n" % (src_associations_id_serial, testing_id, tmp_source_id))
file.close();
count_bad = 0;
suite = string.lower(suite);
suite_id = db_access.get_suite_id(suite);
- if suite == "stable":
- testing_id = db_access.get_suite_id("testing");
try:
file = utils.open_file (filename);
except utils.cant_open_exc:
bin_associations_id_serial = bin_associations_id_serial + 1;
bin_associations_query_cache.write("%d\t%d\t%d\n" % (bin_associations_id_serial, suite_id, tmp_binaries_id));
- if suite == "stable":
- bin_associations_id_serial = bin_associations_id_serial + 1;
- bin_associations_query_cache.write("%d\t%d\t%d\n" % (bin_associations_id_serial, testing_id, tmp_binaries_id));
count_total = count_total +1;
file.close();