From e381846f897a42d36325f9a5ed1f3432caebe046 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Wed, 27 Jul 2011 20:18:53 +0100 Subject: [PATCH] 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 --- config/debian/dak.conf | 10 ---------- dak/rm.py | 13 ++++++++++--- 2 files changed, 10 insertions(+), 13 deletions(-) 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"]: -- 2.39.5