[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Get rid of DatabaseHostname.



This also requires dropping __PRIMARY_MIRROR__ from the removal templates,
but this field already got the wrong value in case there are multiple
archives with different mirrors as only a single value was supported.
---
 config/debian-security/dak.conf-etc |    1 -
 config/debian/dak.conf-etc          |    2 --
 config/examples/dak.conf            |    5 -----
 dak/rm.py                           |    8 --------
 daklib/utils.py                     |    8 --------
 templates/rm.bug-close              |    4 ++--
 templates/rm.bug-close-with-related |    4 ++--
 7 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/config/debian-security/dak.conf-etc b/config/debian-security/dak.conf-etc
index a817013..d6a3194 100644
--- a/config/debian-security/dak.conf-etc
+++ b/config/debian-security/dak.conf-etc
@@ -2,7 +2,6 @@ Config
 {
   chopin.debian.org
   {
-    DatabaseHostname    "security";
     DakConfig           "/org/security-master.debian.org/dak/config/debian-security/dak.conf";
   }
 }
diff --git a/config/debian/dak.conf-etc b/config/debian/dak.conf-etc
index 63f4212..eaf35d7 100644
--- a/config/debian/dak.conf-etc
+++ b/config/debian/dak.conf-etc
@@ -3,13 +3,11 @@ Config
   franck.debian.org
   {
     AllowLocalConfig    "false";
-    DatabaseHostname    "ftp-master";
     DakConfig           "/srv/ftp-master.debian.org/dak/config/debian/dak.conf";
   }
   coccia.debian.org
   {
     AllowLocalConfig    "false";
-    DatabaseHostname    "ftp-master";
     DakConfig           "/srv/ftp-master.debian.org/dak/config/debian/dak.conf";
   }
 }
diff --git a/config/examples/dak.conf b/config/examples/dak.conf
index e9d10c6..b49be95 100644
--- a/config/examples/dak.conf
+++ b/config/examples/dak.conf
@@ -5,11 +5,6 @@ Config
   // FQDN hostname
   raff.debian.org
   {
-
-    // Optional hostname as it appears in the database (if it differs
-    // from the FQDN hostname).
-    DatbaseHostname     "ftp-master";
-
     // Optional filename of dak's config file; if not present, this
     // file is assumed to contain dak config info.
     DakConfig		"/org/ftp.debian.org/dak/config/debian/dak.conf";
diff --git a/dak/rm.py b/dak/rm.py
index 688ea19..97af8c2 100755
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -463,14 +463,6 @@ def main ():
         summarymail += "----------------------------------------------\n"
         Subst_close_rm["__SUMMARY__"] = summarymail
 
-        whereami = utils.where_am_i()
-        Archive = get_archive(whereami, session)
-        if Archive is None:
-            utils.warn("Cannot find archive %s.  Setting blank values for origin" % whereami)
-            Subst_close_rm["__PRIMARY_MIRROR__"] = ""
-        else:
-            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"]:
diff --git a/daklib/utils.py b/daklib/utils.py
index 655e381..0febd10 100644
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -762,14 +762,6 @@ def copy (src, dest, overwrite = 0, perms = 0o664):
 
 ################################################################################
 
-def where_am_i ():
-    res = socket.getfqdn()
-    database_hostname = Cnf.get("Config::" + res + "::DatabaseHostname")
-    if database_hostname:
-        return database_hostname
-    else:
-        return res
-
 def which_conf_file ():
     if os.getenv('DAK_CONFIG'):
         return os.getenv('DAK_CONFIG')
diff --git a/templates/rm.bug-close b/templates/rm.bug-close
index 08a3d8a..c53b27f 100644
--- a/templates/rm.bug-close
+++ b/templates/rm.bug-close
@@ -17,8 +17,8 @@ database and may (or may not) still be in the pool; this is not a bug.
 The package(s) will be physically removed automatically when no suite
 references them (and in the case of source, when no binary references
 it).  Please also remember that the changes have been done on the
-master archive and will not propagate to any mirrors (__PRIMARY_MIRROR__
-included) until the next dinstall run at the earliest.
+master archive and will not propagate to any mirrors until the next
+dinstall run at the earliest.
 
 Packages are usually not removed from testing by hand. Testing tracks
 unstable and will automatically remove packages which were removed
diff --git a/templates/rm.bug-close-with-related b/templates/rm.bug-close-with-related
index fc02eaf..31623db 100644
--- a/templates/rm.bug-close-with-related
+++ b/templates/rm.bug-close-with-related
@@ -17,8 +17,8 @@ database and may (or may not) still be in the pool; this is not a bug.
 The package(s) will be physically removed automatically when no suite
 references them (and in the case of source, when no binary references
 it).  Please also remember that the changes have been done on the
-master archive and will not propagate to any mirrors (__PRIMARY_MIRROR__
-included) until the next dinstall run at the earliest.
+master archive and will not propagate to any mirrors until the next
+dinstall run at the earliest.
 
 Packages are usually not removed from testing by hand. Testing tracks
 unstable and will automatically remove packages which were removed
-- 
1.7.10.4



Reply to: