summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-03-09 16:19:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-28 22:31:53 +0100
commit58d232e1263af6b796377e7aab868918bf111fb5 (patch)
tree8f4d2cb1421387e393297fc057a67f0312a10190 /scripts
parent343ed537c3ae1e740b9e2a8fa3b3a210ade5dccf (diff)
downloadpoky-58d232e1263af6b796377e7aab868918bf111fb5.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. (From OE-Core rev: 4ad488d2453525b7196e6d2406ac526412e3c560) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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,
125 return af 125 return af
126 126
127def _cleanup_on_error(rd, srctree): 127def _cleanup_on_error(rd, srctree):
128 rdp = os.path.split(rd)[0] # recipes folder
129 if os.path.exists(rd): 128 if os.path.exists(rd):
130 shutil.rmtree(rd) 129 shutil.rmtree(rd)
131 if not len(os.listdir(rdp)):
132 os.rmdir(rdp)
133 srctree = os.path.abspath(srctree) 130 srctree = os.path.abspath(srctree)
134 if os.path.exists(srctree): 131 if os.path.exists(srctree):
135 shutil.rmtree(srctree) 132 shutil.rmtree(srctree)