summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/setbuilder.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-08-15 12:20:29 +1000
committerChris Johns <chrisj@rtems.org>2013-08-15 12:20:29 +1000
commit869b8a6bd33ae163518eef4ca017cc46881f20fc (patch)
treebf600d01170ce671d155fa24b646de2fb85dd74e /source-builder/sb/setbuilder.py
parentdoc: Add controlling the build. Add patch to cygwin. (diff)
downloadrtems-source-builder-869b8a6bd33ae163518eef4ca017cc46881f20fc.tar.bz2
sb: Fix the copy tree.
Python's distutil's copy tree code maintains a cache of directories created so deleting a tree a different way then coping the same tree results in an error because the destination folders in the tree are not present because distutils thinks they exist. The solution is to implement a copy tree function.
Diffstat (limited to 'source-builder/sb/setbuilder.py')
-rw-r--r--source-builder/sb/setbuilder.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index 7986192..efb8da5 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -24,7 +24,6 @@
import copy
import datetime
-import distutils.dir_util
import glob
import operator
import os
@@ -83,19 +82,7 @@ class buildset:
def copy(self, src, dst):
log.output('copy: %s => %s' % (path.host(src), path.host(dst)))
if not self.opts.dry_run():
- if not os.path.isdir(path.host(src)):
- raise error.general('copying tree: no source directory: %s' % \
- (path.host(src)))
- if not self.opts.dry_run():
- try:
- files = distutils.dir_util.copy_tree(path.host(src),
- path.host(dst))
- for f in files:
- log.output(f)
- except IOError, err:
- raise error.general('copying tree: %s -> %s: %s' % (src, dst, str(err)))
- except distutils.errors.DistutilsFileError, err:
- raise error.general('copying tree: %s' % (str(err)))
+ path.copy_tree(src, dst)
def report(self, _config, _build):
if not _build.opts.get_arg('--no-report') \