diff options
| author | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-08 00:21:02 -0500 |
|---|---|---|
| committer | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-08 00:21:02 -0500 |
| commit | 84211749a73cbff248192519c0f458806b1fb065 (patch) | |
| tree | 0ee0ef9968f041f6cdf4fead0f5f9d482bf1b0fb /modules/mock.py | |
| parent | 6d3b33fa6c32c8702bab887e621f9cf61aaf9108 (diff) | |
| download | fedora-devshell-84211749a73cbff248192519c0f458806b1fb065.tar.gz fedora-devshell-84211749a73cbff248192519c0f458806b1fb065.tar.xz fedora-devshell-84211749a73cbff248192519c0f458806b1fb065.zip | |
Some minor tweaks and fixes
Diffstat (limited to 'modules/mock.py')
| -rw-r--r-- | modules/mock.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/mock.py b/modules/mock.py index aaa0108..e15a063 100644 --- a/modules/mock.py +++ b/modules/mock.py @@ -22,7 +22,7 @@ from subprocess import Popen from base.base import log from base.module import Module from base.profiles import ver_rel -from base.util import pwd +from base.util import pwd, log_file from modules.build import Build from modules.dirfactory import DirFactory @@ -44,17 +44,19 @@ class Mock(Module): mock_cfg = self.profile.mock_cfg result_dir = self.profile.result_dir config_dir = self.profile.mock_cfg_dir - cmd = ['mock', '-r %s' % mock_cfg, + log.debug('mock_cfg is ' + mock_cfg) + log.debug('result_dir is ' + result_dir) + log.debug('config_dir is ' + config_dir) + cmd = ['mock', '-r', mock_cfg, '--configdir=%s' % config_dir, '--resultdir=%s' % result_dir, srpm_name] log.debug('cmd is ' + str(cmd)) - with pwd(pkg.dir): - with file('mock.log', 'w') as mock_out: - with pwd(result_dir): - p = Popen(cmd, stdout=mock_out, stderr=mock_out) - log.info('mock compiling %s... please wait' % srpm_name) - p.wait() + with pwd(result_dir): + with log_file('mock.log') as mock_out: + p = Popen(cmd, stdout=mock_out, stderr=mock_out) + log.info('mock compiling %s... please wait' % srpm_name) + p.communicate() def close(self): self.build.close() |
