################################################################################
# On 30 Nov 1998, James Troup wrote:
################################################################################
# On 30 Nov 1998, James Troup wrote:
# Your clone will need some help to take over the world, maybe clone up an
# army of penguins and threaten to unleash them on the world, forcing
# governments to sway to the new James' will!
# Your clone will need some help to take over the world, maybe clone up an
# army of penguins and threaten to unleash them on the world, forcing
# governments to sway to the new James' will!
# Yes, I can envision a day when James' duplicate decides to take a horrific
# vengance on the James that spawned him and unleashes his fury in the form
# of thousands upon thousands of chickens that look just like Captin Blue
# Eye! Oh the horror.
# Yes, I can envision a day when James' duplicate decides to take a horrific
# vengance on the James that spawned him and unleashes his fury in the form
# of thousands upon thousands of chickens that look just like Captin Blue
# Eye! Oh the horror.
# Now you'll have to were name tags to people can tell you apart, unless of
# course the new clone is truely evil in which case he should be easy to
# identify!
# Now you'll have to were name tags to people can tell you apart, unless of
# course the new clone is truely evil in which case he should be easy to
# identify!
################################################################################
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))
if action == "add" or old_priority_id == priority_id and \
old_section_id == section_id and \
((old_maintainer_override == maintainer_override) or \
if action == "add" or old_priority_id == priority_id and \
old_section_id == section_id and \
((old_maintainer_override == maintainer_override) or \
################################################################################
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"),
# Default arguments
for i in [ "add", "help", "list", "quiet", "set" ]:
# Default arguments
for i in [ "add", "help", "list", "quiet", "set" ]:
- if not Cnf.has_key("Control-Overrides::Options::%s" % (i)):
- Cnf["Control-Overrides::Options::%s" % (i)] = ""
+ if not Cnf.has_key("Control-Overrides::Options::%s" % (i)):
+ Cnf["Control-Overrides::Options::%s" % (i)] = ""
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()