X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=d18bc70594ac8fd8c03d60978f69953a8f3744b7;hb=e939620de1f925def64465f20f1f2320f092d967;hp=236e36aa4cfbd005679f5f22f6f21a6de7d5d429;hpb=df984f92931b276da9e3ddb0b2fb6e7dc05d91d6;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index 236e36aa..d18bc705 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -419,15 +419,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