]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
Merge branch 'master' into bpo
[dak.git] / daklib / dbconn.py
index fbebec5071126657aa19ac479080460faf7a5132..a34e5c75e8ebb57a01e18fbf55c74088741d22d0 100755 (executable)
@@ -37,6 +37,7 @@ import os
 import re
 import psycopg2
 import traceback
+import commands
 from datetime import datetime, timedelta
 from errno import ENOENT
 from tempfile import mkstemp, mkdtemp
@@ -441,8 +442,8 @@ MINIMAL_APT_CONF="""
 Dir
 {
    ArchiveDir "%(archivepath)s";
-   OverrideDir "/srv/ftp.debian.org/scripts/override/";
-   CacheDir "/srv/ftp.debian.org/database/";
+   OverrideDir "/srv/backports-master.debian.org/scripts/override/";
+   CacheDir "/srv/backports-master.debian.org/database/";
 };
 
 Default
@@ -1511,7 +1512,7 @@ def get_location(location, component=None, archive=None, session=None):
     and archive
 
     @type location: string
-    @param location: the path of the location, e.g. I{/srv/ftp.debian.org/ftp/pool/}
+    @param location: the path of the location, e.g. I{/srv/ftp-master.debian.org/ftp/pool/}
 
     @type component: string
     @param component: the component name (if None, no restriction applied)
@@ -2212,30 +2213,6 @@ def get_source_in_suite(source, suite, session=None):
 
 __all__.append('get_source_in_suite')
 
-@session_wrapper
-def get_all_sources_in_suite(suitename, session=None):
-    """
-    Returns list of sources and versions found in a given suite
-
-      - B{suite} - a suite name, eg. I{unstable}
-
-    @type suite: string
-    @param suite: the suite name
-
-    @rtype: dictionary
-    @return: the version for I{source} in I{suite}
-
-    """
-    query = """SELECT source, version FROM source_suite
-    WHERE suite_name=:suitename
-    ORDER BY source"""
-
-    vals = {'suitename': suitename}
-   
-    return session.execute(query, vals)
-
-__all__.append('get_all_sources_in_suite')
-
 ################################################################################
 
 @session_wrapper
@@ -2482,7 +2459,6 @@ SUITE_FIELDS = [ ('SuiteName', 'suite_name'),
                  ('OverrideSuite', 'overridesuite'),
                  ('ChangelogBase', 'changelogbase')]
 
-
 class Suite(object):
     def __init__(self, *args, **kwargs):
         pass
@@ -2679,28 +2655,6 @@ class Uid(object):
 
 __all__.append('Uid')
 
-@session_wrapper
-def add_database_user(uidname, session=None):
-    """
-    Adds a database user
-
-    @type uidname: string
-    @param uidname: The uid of the user to add
-
-    @type session: SQLAlchemy
-    @param session: Optional SQL session object (a temporary one will be
-    generated if not supplied).  If not passed, a commit will be performed at
-    the end of the function, otherwise the caller is responsible for commiting.
-
-    @rtype: Uid
-    @return: the uid object for the given uidname
-    """
-
-    session.execute("CREATE USER :uid", {'uid': uidname})
-    session.commit_or_flush()
-
-__all__.append('add_database_user')
-
 @session_wrapper
 def get_or_set_uid(uidname, session=None):
     """