summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-03-09 16:19:33 +0100
committerSteve Sakoman <steve@sakoman.com>2023-03-21 04:33:39 -1000
commitbb350782ba1a66f1cf0d3e043000f5e1535cf961 (patch)
treef1285e75a916c189854e2c67796023302353df9d
parent705b5c51610a1d5a267a3f6559667a5f70fbadf5 (diff)
downloadopenembedded-core-bb350782ba1a66f1cf0d3e043000f5e1535cf961.tar.gz
devtool/upgrade: do not delete the workspace/recipes directory
If it exists, there is no need to delete it, and if it does not, devtool prints an ugly traceback. Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit af82e59e8f08369aabd5fa6eb43022982d4e59a7) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--scripts/lib/devtool/upgrade.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 967d157077..6c4a62b558 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -125,11 +125,8 @@ def _write_append(rc, srctreebase, srctree, same_dir, no_same_dir, rev, copied,
return af
def _cleanup_on_error(rd, srctree):
- rdp = os.path.split(rd)[0] # recipes folder
if os.path.exists(rd):
shutil.rmtree(rd)
- if not len(os.listdir(rdp)):
- os.rmdir(rdp)
srctree = os.path.abspath(srctree)
if os.path.exists(srctree):
shutil.rmtree(srctree)