################################################################################
def process_file (file, suite, component, type, action):
################################################################################
def process_file (file, suite, component, type, action):
# --set is done mostly internal for performance reasons; most
# invocations of --set will be updates and making people wait 2-3
# --set is done mostly internal for performance reasons; most
# invocations of --set will be updates and making people wait 2-3
elif len(split_line) == 3:
(package, section, maintainer_override) = split_line
else:
elif len(split_line) == 3:
(package, section, maintainer_override) = split_line
else:
elif len(split_line) == 4:
(package, priority, section, maintainer_override) = split_line
else:
elif len(split_line) == 4:
(package, priority, section, maintainer_override) = split_line
else:
- dak.lib.utils.warn("'%s' is not a valid section. ['%s' in suite %s, component %s]." % (section, package, suite, component))
+ daklib.utils.warn("'%s' is not a valid section. ['%s' in suite %s, component %s]." % (section, package, suite, component))
- dak.lib.utils.warn("'%s' is not a valid priority. ['%s' in suite %s, component %s]." % (priority, package, suite, component))
+ daklib.utils.warn("'%s' is not a valid priority. ['%s' in suite %s, component %s]." % (priority, package, suite, component))
- dak.lib.utils.warn("Can't insert duplicate entry for '%s'; ignoring all but the first. [suite %s, component %s]" % (package, suite, component))
+ daklib.utils.warn("Can't insert duplicate entry for '%s'; ignoring all but the first. [suite %s, component %s]" % (package, suite, component))
################################################################################
def list(suite, component, type):
################################################################################
def list(suite, component, type):
if type == "dsc":
q = projectB.query("SELECT o.package, s.section, o.maintainer FROM override o, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.section = s.id ORDER BY s.section, o.package" % (suite_id, component_id, type_id))
for i in q.getresult():
if type == "dsc":
q = projectB.query("SELECT o.package, s.section, o.maintainer FROM override o, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.section = s.id ORDER BY s.section, o.package" % (suite_id, component_id, type_id))
for i in q.getresult():
else:
q = projectB.query("SELECT o.package, p.priority, s.section, o.maintainer, p.level FROM override o, priority p, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.priority = p.id AND o.section = s.id ORDER BY s.section, p.level, o.package" % (suite_id, component_id, type_id))
for i in q.getresult():
else:
q = projectB.query("SELECT o.package, p.priority, s.section, o.maintainer, p.level FROM override o, priority p, section s WHERE o.suite = %s AND o.component = %s AND o.type = %s AND o.priority = p.id AND o.section = s.id ORDER BY s.section, p.level, o.package" % (suite_id, component_id, type_id))
for i in q.getresult():
################################################################################
def main ():
global Cnf, projectB, Logger
################################################################################
def main ():
global Cnf, projectB, Logger
Arguments = [('a', "add", "Control-Overrides::Options::Add"),
('c', "component", "Control-Overrides::Options::Component", "HasArg"),
('h', "help", "Control-Overrides::Options::Help"),
Arguments = [('a', "add", "Control-Overrides::Options::Add"),
('c', "component", "Control-Overrides::Options::Component", "HasArg"),
('h', "help", "Control-Overrides::Options::Help"),
action = None
for i in [ "add", "list", "set" ]:
if Cnf["Control-Overrides::Options::%s" % (i)]:
if action:
action = None
for i in [ "add", "list", "set" ]:
if Cnf["Control-Overrides::Options::%s" % (i)]:
if action:
action = i
(suite, component, type) = (Cnf["Control-Overrides::Options::Suite"],
action = i
(suite, component, type) = (Cnf["Control-Overrides::Options::Suite"],
- Logger = dak.lib.logging.Logger(Cnf, "control-overrides")
+ if Cnf.has_key("Suite::%s::Untouchable" % suite) and Cnf["Suite::%s::Untouchable" % suite] != 0:
+ daklib.utils.fubar("%s: suite is untouchable" % suite)
+
+ Logger = daklib.logging.Logger(Cnf, "control-overrides")
- process_file(dak.lib.utils.open_file(file), suite, component, type, action)
+ process_file(daklib.utils.open_file(file), suite, component, type, action)
else:
process_file(sys.stdin, suite, component, type, action)
Logger.close()
else:
process_file(sys.stdin, suite, component, type, action)
Logger.close()