- quoted_packages_list = []
- for package in arguments:
- quoted_packages_list.append("'%s'" % package)
- packages[package] = "";
- con_packages = "AND %s IN (%s)" % (field, string.join(quoted_packages_list, ", "));
- suites = [];
- suite_ids_list = [];
- for suite in string.split(Options["Suite"]):
-
- if not Options["No-Action"] and suite == "stable":
- print "**WARNING** About to remove from the stable suite!"
- print "This should only be done just prior to a (point) release and not at"
- print "any other time."
- game_over();
- elif not Options["No-Action"] and suite == "testing":
- print "**WARNING About to remove from the testing suite!"
- print "There's no need to do this normally as removals from unstable will"
- print "propogate to testing automagically."
- game_over();
-
- suite_id = db_access.get_suite_id(suite);
- if suite_id == -1:
- utils.warn("suite '%s' not recognised." % (suite));
- else:
- suites.append(suite);
- suite_ids_list.append(suite_id);
- if suite_ids_list:
- suites_list = string.join(suites, ", ")
- con_suites = "AND su.id IN (%s)" % string.join(map(str, suite_ids_list), ", ");
- else:
- utils.fubar("No correct suite given.");
- if Options["Component"]:
- components_ids_list = [];
- for component in string.split(Options["Component"]):
- component_id = db_access.get_component_id(component);
- if component_id == -1:
- utils.warn("component '%s' not recognised." % (component));
- else:
- components_ids_list.append(component_id);
- con_components = "AND c.id IN (%s)" % string.join(map(str, components_ids_list), ", ");
- over_con_components = "AND component IN (%s)" % string.join(map(str, components_ids_list), ", ");
- else:
- con_components = "";
- over_con_components = "";
-
- if Options["Architecture"]:
- arch_ids_list = [];
- for architecture in string.split(Options["Architecture"]):
- architecture_id = db_access.get_architecture_id(architecture);
- if architecture_id == -1:
- utils.warn("architecture '%s' not recognised." % (architecture));
- else:
- arch_ids_list.append(architecture_id);
- if arch_ids_list:
- con_architectures = "AND a.id IN (%s)" % string.join(map(str, arch_ids_list), ", ");
- else:
- utils.fubar("No correct architecture given");
- else:
- con_architectures = "";