summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:03:14 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:14 +0000
commitb272c5174fae042d6d1c6395dd2da107049b1464 (patch)
treee7a938f00f62fa8ac923a8a093318f674487b616 /scripts/lib/devtool
parent95a234e7b3b2d7002aada4e65aa44ac6c8af815f (diff)
downloadpoky-b272c5174fae042d6d1c6395dd2da107049b1464.tar.gz
devtool: reset: print message about leaving source tree behind
We deliberately leave the source tree alone when resetting in case it contains any work in progress belonging to the user; tell them that we're doing this so they aren't surprised about it still existing later on. (From OE-Core rev: 1c616802ba2cfb37f8403f1dc6cf91ce3bd99ac2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/standard.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index ed9e793d4a..a9c4cf8d8d 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1229,6 +1229,17 @@ def reset(args, config, basepath, workspace):
1229 # We don't automatically create this dir next to appends, but the user can 1229 # We don't automatically create this dir next to appends, but the user can
1230 preservedir(os.path.join(config.workspace_path, 'appends', pn)) 1230 preservedir(os.path.join(config.workspace_path, 'appends', pn))
1231 1231
1232 srctree = workspace[pn]['srctree']
1233 if os.path.isdir(srctree):
1234 if os.listdir(srctree):
1235 # We don't want to risk wiping out any work in progress
1236 logger.info('Leaving source tree %s as-is; if you no '
1237 'longer need it then please delete it manually'
1238 % srctree)
1239 else:
1240 # This is unlikely, but if it's empty we can just remove it
1241 os.rmdir(srctree)
1242
1232 return 0 1243 return 0
1233 1244
1234 1245