X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=9b1514d7ca1e9e9180f17998e50b3f8c254d5cc4;hb=51964a1cda58d2292b66bc97f594804ed8190d49;hp=236e36aa4cfbd005679f5f22f6f21a6de7d5d429;hpb=e2c4fd7f21c3b33cd7192bded5d6373e0ee90374;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index 236e36aa..9b1514d7 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -122,7 +122,6 @@ def britney_changelog(packages, suite, session): for p in q.fetchall(): current[p[0]] = p[1] for p in packages.keys(): - p = p.split() if p[2] == "source": old[p[0]] = p[1] @@ -419,15 +418,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