diff options
author | Colin Walters <walters@verbum.org> | 2010-05-13 14:45:21 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-05-13 14:45:21 -0400 |
commit | 9a30b373d2daa89cf524eb600ea04c552d3d7d6d (patch) | |
tree | b46f011d54d6d4ff13eff38dfedcb0d9b164c0ba /fedpkg-pull-build-chain | |
parent | 8d85cb23b710c9bd3747d9b667b2f6039279601b (diff) | |
download | fedpkg-make-pull-9a30b373d2daa89cf524eb600ea04c552d3d7d6d.tar.gz fedpkg-make-pull-9a30b373d2daa89cf524eb600ea04c552d3d7d6d.tar.xz fedpkg-make-pull-9a30b373d2daa89cf524eb600ea04c552d3d7d6d.zip |
Really append release to builddir
Diffstat (limited to 'fedpkg-pull-build-chain')
-rwxr-xr-x | fedpkg-pull-build-chain | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fedpkg-pull-build-chain b/fedpkg-pull-build-chain index 8861511..6aad881 100755 --- a/fedpkg-pull-build-chain +++ b/fedpkg-pull-build-chain @@ -97,14 +97,15 @@ def main(): os.mkdir(resultdir) check_call_verbose(['createrepo', '.'], cwd=resultdir) + builddir = '_build-' + release try: - os.mkdir('_build-' + release) + os.mkdir(builddir) except OSError, e: pass mockreleases = [] for f in ('site-defaults.cfg', 'logging.ini'): - shutil.copy2('/etc/mock/' + f, '_build') + shutil.copy2('/etc/mock/' + f, builddir) for architecture in architectures: # FIXME do this better @@ -117,7 +118,7 @@ def main(): mockrelease = '%s-%s' % (mockprefix, architecture) f_in = open(os.path.join('/etc', 'mock', mockrelease + '.cfg')) - new_mockrelease_path = os.path.join('_build', mockrelease + '.cfg') + new_mockrelease_path = os.path.join(builddir, mockrelease + '.cfg') f_out = open(new_mockrelease_path, 'w') for line in f_in: f_out.write(line) @@ -139,7 +140,7 @@ def main(): print "Deleting old srpm: " + fpath os.unlink(fpath) - mock_resultdir = os.path.join('_build', arg) + mock_resultdir = os.path.join(builddir, arg) try: os.makedirs(mock_resultdir) except OSError, e: @@ -190,7 +191,7 @@ def main(): for mockrelease in mockreleases: try: notify_state('build', { 'module': arg, 'srpm': os.path.basename(srpm), 'target': mockrelease }) - check_call_verbose(['mock', '--configdir=_build', '-r', mockrelease, '--resultdir=' + mock_resultdir, 'rebuild', srpm], stdout=sys.stdout, stderr=sys.stderr) + check_call_verbose(['mock', '--configdir=' + builddir, '-r', mockrelease, '--resultdir=' + mock_resultdir, 'rebuild', srpm], stdout=sys.stdout, stderr=sys.stderr) except subprocess.CalledProcessError, e: print "Failed: " + unicode(e) current_failed = True |