From ad72d0b852c2f820abd263cb6f2ba5e99546b28d Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Wed, 6 Feb 2019 16:48:02 +0100 Subject: [PATCH] init: Change west init to clone manifest repo inside .west Fixes: #186 Instead of cloning manifest repo into temp directory, which can be a disk different from final destination, then the manifest repo is now cloned into .west, and from there, moved to its final location. Signed-off-by: Torsten Rasmussen --- src/west/_bootstrap/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/west/_bootstrap/main.py b/src/west/_bootstrap/main.py index 53a6d15..00d9dc1 100644 --- a/src/west/_bootstrap/main.py +++ b/src/west/_bootstrap/main.py @@ -13,7 +13,6 @@ import pykwalify.core import subprocess import sys import yaml -import tempfile import shutil import west._bootstrap.version as version @@ -285,7 +284,8 @@ def bootstrap(args): # Clone the west source code and the manifest into west/. Git will create # the west/ directory if it does not exist. - tempdir = tempfile.mkdtemp(prefix='manifest_') + tempdir = os.path.join(os.path.abspath(directory), + WEST_DIR, 'tmp') try: clone('manifest repository', manifest_url, manifest_rev, tempdir, exist_ok=True)