From: Joerg Jaspert Date: Tue, 7 Sep 2010 20:32:06 +0000 (+0200) Subject: minimal_apt_conf X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=e11af921d319301cdc8479da87b3aee038aef425;p=dak.git minimal_apt_conf use cachedir/overridedir fixup the configs to have a cachedir Signed-off-by: Joerg Jaspert --- diff --git a/config/backports/dak.conf b/config/backports/dak.conf index df243ae4..422dce61 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 1dd52a4e..2ceefa8d 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 a34e5c75..65e14104 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"]