From ee47d7210e669c2bb2f9b5921a54ac5f369e80a2 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 22 Feb 2013 14:44:51 +1100 Subject: Create tar directory when making build set tar files. Move the mkdir and removeall code from the build module to the path module. --- source-builder/sb/setbuilder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source-builder/sb/setbuilder.py') 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 + "'") -- cgit v1.2.3