X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;fp=dak%2Fcontrol_suite.py;h=3ba5acdced15ae8f5bc731f00ce754d86238d15e;hb=d092db5a64fc5ee4143493a7f2bbb327077e08a3;hp=57e43da6ac0b77418c8b4745d4c900ef9c4c8728;hpb=caf4c05ab2b773cb8ca14f64418651af2377aa53;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index 57e43da6..3ba5acdc 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -421,15 +421,17 @@ def main (): utils.fubar("Can only perform one action at a time.") action = i + # Safety/Sanity check + if action == "set" and (not suite.allowcsset): + if force: + utils.warn("Would not normally allow setting suite %s (allowsetcs is FALSE), but --force used" % (suite_name)) + else: + utils.fubar("Will not reset suite %s due to its database configuration (allowsetcs is FALSE)" % (suite_name)) + # Need an action... if action == None: utils.fubar("No action specified.") - # Safety/Sanity check - # XXX: This should be stored in the database - if action == "set" and suite_name not in ["testing", "squeeze-updates"]: - utils.fubar("Will not reset suite %s" % (suite_name)) - britney = False if action == "set" and cnf["Control-Suite::Options::Britney"]: britney = True