]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote branch 'mario/master' into merge
authorJoerg Jaspert <joerg@debian.org>
Sat, 27 Feb 2010 09:07:27 +0000 (10:07 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 27 Feb 2010 09:07:27 +0000 (10:07 +0100)
* mario/master:
  init_db.py: fix for `do_priority'
  init_db.py: `Cnf.get' fix for `do_priority'
  init_db.py: fixes for `do_suite'
  init_db.py: typo fix for `do_suite' comment.
  admin.py: added command to add suites

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/show_new.py
daklib/utils.py

index bcf1300e155fcdb0b0077b68b95366f503bc0b87..5c7e8864263f72928930af51bf64af2a686dc924 100755 (executable)
@@ -177,15 +177,13 @@ def do_pkg(changes_file, session):
         filestoexamine = []
         for pkg in new.keys():
             for fn in new[pkg]["files"]:
-                if (files[fn].has_key("new") and
-                    (files[fn]["type"] == "dsc" or
-                     not re_source_ext.match(files[fn]["type"]))):
-                    filestoexamine.append(fn)
+                filestoexamine.append(fn)
 
         html_header(changes["source"], filestoexamine)
 
         check_valid(new)
-        examine_package.display_changes( u.pkg.changes["distribution"], changes_file)
+        distribution = changes["distribution"].keys()[0]
+        examine_package.display_changes(distribution, changes_file)
 
         for fn in filter(lambda fn: fn.endswith(".dsc"), filestoexamine):
             examine_package.check_dsc(distribution, fn)
index b1a34c92c9f26ba23f0415abf0f3633253cb6395..0896d57839eb335f30f375a602519cb727deb15c 100755 (executable)
@@ -730,20 +730,20 @@ def copy (src, dest, overwrite = 0, perms = 0664):
 ################################################################################
 
 def where_am_i ():
-    res = socket.gethostbyaddr(socket.gethostname())
-    database_hostname = Cnf.get("Config::" + res[0] + "::DatabaseHostname")
+    res = socket.getfqdn()
+    database_hostname = Cnf.get("Config::" + res + "::DatabaseHostname")
     if database_hostname:
         return database_hostname
     else:
-        return res[0]
+        return res
 
 def which_conf_file ():
     if os.getenv('DAK_CONFIG'):
         return os.getenv('DAK_CONFIG')
 
-    res = socket.gethostbyaddr(socket.gethostname())
+    res = socket.getfqdn()
     # In case we allow local config files per user, try if one exists
-    if Cnf.FindB("Config::" + res[0] + "::AllowLocalConfig"):
+    if Cnf.FindB("Config::" + res + "::AllowLocalConfig"):
         homedir = os.getenv("HOME")
         confpath = os.path.join(homedir, "/etc/dak.conf")
         if os.path.exists(confpath):
@@ -751,27 +751,27 @@ def which_conf_file ():
 
     # We are still in here, so there is no local config file or we do
     # not allow local files. Do the normal stuff.
-    if Cnf.get("Config::" + res[0] + "::DakConfig"):
-        return Cnf["Config::" + res[0] + "::DakConfig"]
+    if Cnf.get("Config::" + res + "::DakConfig"):
+        return Cnf["Config::" + res + "::DakConfig"]
 
     return default_config
 
 def which_apt_conf_file ():
-    res = socket.gethostbyaddr(socket.gethostname())
+    res = socket.getfqdn()
     # In case we allow local config files per user, try if one exists
-    if Cnf.FindB("Config::" + res[0] + "::AllowLocalConfig"):
+    if Cnf.FindB("Config::" + res + "::AllowLocalConfig"):
         homedir = os.getenv("HOME")
         confpath = os.path.join(homedir, "/etc/dak.conf")
         if os.path.exists(confpath):
             apt_pkg.ReadConfigFileISC(Cnf,default_config)
 
-    if Cnf.get("Config::" + res[0] + "::AptConfig"):
-        return Cnf["Config::" + res[0] + "::AptConfig"]
+    if Cnf.get("Config::" + res + "::AptConfig"):
+        return Cnf["Config::" + res + "::AptConfig"]
     else:
         return default_apt_config
 
 def which_alias_file():
-    hostname = socket.gethostbyaddr(socket.gethostname())[0]
+    hostname = socket.getfqdn()
     aliasfn = '/var/lib/misc/'+hostname+'/forward-alias'
     if os.path.exists(aliasfn):
         return aliasfn