From fba101d3fcecbecfedac5a42b6169b01f5943a32 Mon Sep 17 00:00:00 2001 From: "jkeating@reducto.boston.redhat.com" <> Date: Fri, 16 Feb 2007 09:37:52 -0500 Subject: [PATCH] Put yum temp stuff in workdir --- Changelog | 4 ++++ config/yum.conf.fc6.i386 | 2 -- config/yum.conf.fc6.ppc | 2 -- config/yum.conf.fc6.x86_64 | 2 -- config/yum.conf.i386 | 2 -- config/yum.conf.x86_64 | 2 -- pypungi/gather.py | 8 +++++++- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Changelog b/Changelog index e63a5293..f8484822 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +* Fri Feb 16 2007 Jesse Keating +- Make use of anaconda's TMPDIR support +- Put yum tempdirs in the workdir + * Thu Feb 15 2007 Jesse Keating - Various logging tweaks - Use -d flag in createrepo for sqlite blobs diff --git a/config/yum.conf.fc6.i386 b/config/yum.conf.fc6.i386 index a9e38214..27ecc088 100644 --- a/config/yum.conf.fc6.i386 +++ b/config/yum.conf.fc6.i386 @@ -1,8 +1,6 @@ [main] -cachedir=/tmp/fist #keepcache=0 #debuglevel=2 -logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 diff --git a/config/yum.conf.fc6.ppc b/config/yum.conf.fc6.ppc index 7b598d3d..4019a125 100644 --- a/config/yum.conf.fc6.ppc +++ b/config/yum.conf.fc6.ppc @@ -1,8 +1,6 @@ [main] -cachedir=/tmp/fist #keepcache=0 #debuglevel=2 -logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 diff --git a/config/yum.conf.fc6.x86_64 b/config/yum.conf.fc6.x86_64 index 5c5b1c03..129f9a3d 100644 --- a/config/yum.conf.fc6.x86_64 +++ b/config/yum.conf.fc6.x86_64 @@ -1,8 +1,6 @@ [main] -cachedir=/tmp/fist #keepcache=0 #debuglevel=2 -logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 diff --git a/config/yum.conf.i386 b/config/yum.conf.i386 index 15435536..c12f9d5b 100644 --- a/config/yum.conf.i386 +++ b/config/yum.conf.i386 @@ -1,8 +1,6 @@ [main] -cachedir=/tmp/fist #keepcache=0 #debuglevel=2 -logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 diff --git a/config/yum.conf.x86_64 b/config/yum.conf.x86_64 index 75da9c36..3f62b615 100644 --- a/config/yum.conf.x86_64 +++ b/config/yum.conf.x86_64 @@ -1,8 +1,6 @@ [main] -cachedir=/tmp/fist #keepcache=0 #debuglevel=2 -logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release tolerant=1 diff --git a/pypungi/gather.py b/pypungi/gather.py index ff740e4d..26474444 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -19,10 +19,16 @@ import sys class Gather(yum.YumBase): def __init__(self, config, pkglist): + self.workdir = os.path.join(config.get('default', 'destdir'), + 'work', + config.get('default', 'flavor'), + config.get('default', 'arch')) + # Create a yum object to use yum.YumBase.__init__(self) self.config = config - self.doConfigSetup(fn=config.get('default', 'yumconf'), debuglevel=6, errorlevel=6, root="/tmp") + self.doConfigSetup(fn=config.get('default', 'yumconf'), debuglevel=6, errorlevel=6, root=os.path.join(self.workdir, 'yumroot')) + self.config.cachedir = os.path.join(self.workdir, 'yumcache') self.cleanMetadata() # clean metadata that might be in the cache from previous runs self.cleanSqlite() # clean metadata that might be in the cache from previous runs self.doRepoSetup()