summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/setbuilder.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-02-22 14:44:51 +1100
committerChris Johns <chrisj@rtems.org>2013-02-22 14:44:51 +1100
commitee47d7210e669c2bb2f9b5921a54ac5f369e80a2 (patch)
tree61b0466ffbbe490864d9b35c7b464e907b2b17d7 /source-builder/sb/setbuilder.py
parentSupport directly installing. (diff)
downloadrtems-source-builder-ee47d7210e669c2bb2f9b5921a54ac5f369e80a2.tar.bz2
Create tar directory when making build set tar files.
Move the mkdir and removeall code from the build module to the path module.
Diffstat (limited to 'source-builder/sb/setbuilder.py')
-rw-r--r--source-builder/sb/setbuilder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index 8890589..79fe58f 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -127,10 +127,10 @@ class buildset:
def last_package(self, _build, tmproot):
if self.opts.get_arg('--bset-tar-file'):
- tar = path.join(_build.config.expand('%{_tardir}'),
- _build.config.expand('%s.tar.bz2' % (self.bset_pkg)))
- _notice(self.opts, 'tarball: %s -> %s' %
- (os.path.relpath(path.host(tmproot)), os.path.relpath(path.host(tar))))
+ tardir = _build.config.expand('%{_tardir}')
+ path.mkdir(tardir)
+ tar = path.join(tardir, _build.config.expand('%s.tar.bz2' % (self.bset_pkg)))
+ _notice(self.opts, 'tarball: %s' % (os.path.relpath(path.host(tar))))
if not self.opts.dry_run():
cmd = _build.config.expand("'cd " + tmproot + \
" && %{__tar} -cf - . | %{__bzip2} > " + tar + "'")