diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-01-30 21:55:56 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-01-30 21:55:56 +0000 |
commit | 2c196037584ab0207bf96eeff15b50d8bc6b1af1 (patch) | |
tree | bea0a6eec90d78455a425abdc241e7c90acfeff4 /scripts/yumcache | |
parent | c23816d5ea246957983736cc05747431009b7cd8 (diff) | |
download | anaconda-2c196037584ab0207bf96eeff15b50d8bc6b1af1.tar.gz anaconda-2c196037584ab0207bf96eeff15b50d8bc6b1af1.tar.xz anaconda-2c196037584ab0207bf96eeff15b50d8bc6b1af1.zip |
2007-01-30 Jeremy Katz <katzj@redhat.com>
* scripts/buildinstall: Use $TMPDIR instead of hard-coded /tmp
(Steve Pritchard <steve@silug.org>, #224438)
* scripts/getkeymaps: Likewise.
* scripts/mk-images: Likewise.
* scripts/mk-images.ia64: Likewise.
* scripts/pkgorder: Likewise.
* scripts/upd-instroot: Likewise.
* scripts/yumcache: Likewise.
Diffstat (limited to 'scripts/yumcache')
-rwxr-xr-x | scripts/yumcache | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/yumcache b/scripts/yumcache index 50ff0ba13..637aaacc8 100755 --- a/scripts/yumcache +++ b/scripts/yumcache @@ -13,8 +13,13 @@ class CacheConf: """Dynamic yum configuration""" def __init__( self, repopath): - self.fd, self.name = tempfile.mkstemp(".conf", "yum-", "/tmp") - self.cachedir = tempfile.mkdtemp("", "yum-cache-", "/tmp") + if os.environ.has_key('TMPDIR'): + self.fd, self.name = tempfile.mkstemp(".conf", "yum-", os.environ['TMPDIR']) + self.cachedir = tempfile.mkdtemp("", "yum-cache-", os.environ['TMPDIR']) + else: + self.fd, self.name = tempfile.mkstemp(".conf", "yum-", "/tmp") + self.cachedir = tempfile.mkdtemp("", "yum-cache-", "/tmp") + self.repopath = repopath self.yumconfstr = """ |