Enable TMPDIR again so that anconda-runtime working files go to the working dir.

This commit is contained in:
Jesse Keating 2007-11-27 14:40:36 -05:00 committed by Jesse Keating
parent 333255c35c
commit 8e5e261774
3 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
* Tue Nov 27 2007 Jesse Keating <jkeating@redhat.com>
- Enable TMPDIR again so that anconda-runtime working files
go to the working dir.
* Thu Nov 22 2007 Jesse Keating <jkeating@redhat.com>
- Print a usage if no options are passed
- Correct a man page typo

View File

@ -52,13 +52,13 @@ class PungiBase(object):
filename=logfile)
def _doRunCommand(command, logger, rundir='/tmp', output=subprocess.PIPE, error=subprocess.PIPE):
def _doRunCommand(command, logger, rundir='/tmp', output=subprocess.PIPE, error=subprocess.PIPE, env=None):
"""Run a command and log the output. Error out if we get something on stderr"""
logger.info("Running %s" % ' '.join(command))
p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error, universal_newlines=True)
p1 = subprocess.Popen(command, cwd=rundir, stdout=output, stderr=error, universal_newlines=True, env=env)
(out, err) = p1.communicate()
if out:

View File

@ -137,7 +137,7 @@ class Pungi(pypungi.PungiBase):
buildinstall.append(self.topdir)
# run the command
pypungi._doRunCommand(buildinstall, self.logger)
pypungi._doRunCommand(buildinstall, self.logger, env={"TMPDIR": self.workdir})
# write out the tree data for snake
self.writeinfo('tree: %s' % self.mkrelative(self.topdir))