From: Mark Hymers Date: Wed, 27 Jul 2011 19:18:53 +0000 (+0100) Subject: Use database instead of config file for Archive:: X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e381846f897a42d36325f9a5ed1f3432caebe046;p=dak.git Use database instead of config file for Archive:: Leave in security and bpo configs for now as they need upgrading before they're removed. Signed-off-by: Mark Hymers --- diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 6b5e17a9..39379ec2 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -366,16 +366,6 @@ DB Unicode "false" }; -Archive -{ - ftp-master - { - OriginServer "ftp-master.debian.org"; - PrimaryMirror "ftp.debian.org"; - Description "Master Archive for the Debian project"; - }; -}; - Urgency { Default "low"; diff --git a/dak/rm.py b/dak/rm.py index e8d25900..944a46e6 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -630,10 +630,17 @@ def main (): summarymail = "%s\n------------------- Reason -------------------\n%s\n" % (summary, Options["Reason"]) summarymail += "----------------------------------------------\n" Subst_close_rm["__SUMMARY__"] = summarymail + whereami = utils.where_am_i() - Archive = cnf.SubTree("Archive::%s" % (whereami)) - Subst_close_rm["__MASTER_ARCHIVE__"] = Archive["OriginServer"] - Subst_close_rm["__PRIMARY_MIRROR__"] = Archive["PrimaryMirror"] + Archive = get_archive(whereami, session) + if Archive is None: + utils.warn("Cannot find archive %s. Setting blank values for origin" % whereami) + Subst_close_rm["__MASTER_ARCHIVE__"] = "" + Subst_close_rm["__PRIMARY_MIRROR__"] = "" + else: + Subst_close_rm["__MASTER_ARCHIVE__"] = Archive.origin_server + Subst_close_rm["__PRIMARY_MIRROR__"] = Archive.primary_mirror + for bug in utils.split_args(Options["Done"]): Subst_close_rm["__BUG_NUMBER__"] = bug if Options["Do-Close"]: