]> err.no Git - dak/commitdiff
minimal_apt_conf
authorJoerg Jaspert <joerg@debian.org>
Tue, 7 Sep 2010 20:32:06 +0000 (22:32 +0200)
committerJoerg Jaspert <joerg@debian.org>
Tue, 7 Sep 2010 20:32:06 +0000 (22:32 +0200)
use cachedir/overridedir
fixup the configs to have a cachedir

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/backports/dak.conf
config/debian/dak.conf
daklib/dbconn.py

index df243ae4b082503d9169b7ccca78b20f5194b5b9..422dce6159698c1b3cdcc0af8dd8f8c976931a5e 100644 (file)
@@ -249,6 +249,7 @@ Dir
   Templates "/srv/backports-master.debian.org/dak/templates/";
   PoolRoot "pool/";
   Lists "/srv/backports-master.debian.org/database/dists/";
+  Cache "/srv/backports-master.debian.org/database/";
   Log "/srv/backports-master.debian.org/log/";
   Lock "/srv/backports-master.debian.org/lock";
   Morgue "/srv/backports-master.debian.org/morgue/";
index 1dd52a4e8e594c48b4977cc79d18e166c3524e43..2ceefa8d4ff05fb1a16d04e2ebee571cf71e6171 100644 (file)
@@ -569,6 +569,7 @@ Dir
   Templates "/srv/ftp-master.debian.org/dak/templates/";
   PoolRoot "pool/";
   Lists "/srv/ftp-master.debian.org/database/dists/";
+  Cache "/srv/ftp-master.debian.org/database/";
   Log "/srv/ftp-master.debian.org/log/";
   Lock "/srv/ftp-master.debian.org/lock";
   Morgue "/srv/ftp-master.debian.org/morgue/";
index a34e5c75e8ebb57a01e18fbf55c74088741d22d0..65e1410444e16811de335ec25e24ad74434af39a 100755 (executable)
@@ -442,8 +442,8 @@ MINIMAL_APT_CONF="""
 Dir
 {
    ArchiveDir "%(archivepath)s";
-   OverrideDir "/srv/backports-master.debian.org/scripts/override/";
-   CacheDir "/srv/backports-master.debian.org/database/";
+   OverrideDir "%(overridedir)s";
+   CacheDir "%(cachedir)s";
 };
 
 Default
@@ -505,11 +505,16 @@ class BuildQueue(object):
                 os.write(fl_fd, '%s\n' % n.fullpath)
             os.close(fl_fd)
 
+            cnf = Config()
+
             # Write minimal apt.conf
             # TODO: Remove hardcoding from template
             (ac_fd, ac_name) = mkstemp()
             os.write(ac_fd, MINIMAL_APT_CONF % {'archivepath': self.path,
-                                                'filelist': fl_name})
+                                                'filelist': fl_name,
+                                                'cachedir': cnf["Dir::Cache"],
+                                                'overridedir': cnf["Dir::Override"],
+                                                })
             os.close(ac_fd)
 
             # Run apt-ftparchive generate
@@ -539,7 +544,6 @@ class BuildQueue(object):
 
             # Sign if necessary
             if self.signingkey:
-                cnf = Config()
                 keyring = "--secret-keyring \"%s\"" % cnf["Dinstall::SigningKeyring"]
                 if cnf.has_key("Dinstall::SigningPubKeyring"):
                     keyring += " --keyring \"%s\"" % cnf["Dinstall::SigningPubKeyring"]