[dak/master] minimal_apt_conf
use cachedir/overridedir
fixup the configs to have a cachedir
Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
config/backports/dak.conf | 1 +
config/debian/dak.conf | 1 +
daklib/dbconn.py | 12 ++++++++----
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/config/backports/dak.conf b/config/backports/dak.conf
index df243ae..422dce6 100644
--- a/config/backports/dak.conf
+++ b/config/backports/dak.conf
@@ -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/";
diff --git a/config/debian/dak.conf b/config/debian/dak.conf
index 1dd52a4..2ceefa8 100644
--- a/config/debian/dak.conf
+++ b/config/debian/dak.conf
@@ -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/";
diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index a34e5c7..65e1410 100755
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -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"]
--
1.5.6.5
Reply to: