return found_targets
def configure_builddir(self, builddir):
- if os.path.exists(builddir):
- raise AssertionError("Cannot create build directory at %s: Path allready exists!" % builddir)
- try:
- os.mkdir(builddir)
- except:
- raise AssertionError("Cannot create %s . Make sure %s exists!" % (dst, os.path.dirname(dst)))
+ os.mkdir(builddir)
+ self.track_for_cleanup(builddir)
os.mkdir(os.path.join(builddir, 'conf'))
shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/local.conf'), os.path.join(builddir, 'conf/local.conf'))
shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/bblayers.conf'), os.path.join(builddir, 'conf/bblayers.conf'))
def hardlink_tree(self, src, dst):
- if os.path.exists(dst):
- raise AssertionError("Cannot create directory at %s: Path allready exists!" % dst)
- try:
- os.mkdir(dst)
- except:
- raise AssertionError("Cannot create %s . Make sure %s exists!" % (dst, os.path.dirname(dst)))
+ os.mkdir(dst)
+ self.track_for_cleanup(dst)
for root, dirs, files in os.walk(src):
if root == src:
continue
buildB = os.path.join(self.builddir, 'buildB')
else:
buildB = buildA
- self.track_for_cleanup(buildA)
- self.track_for_cleanup(buildB)
- self.track_for_cleanup(os.path.join(self.builddir, 'sstate-cache-buildA'))
if rebuild_dependencies:
rebuild_targets = self.get_dep_targets(primary_targets)