aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/utils.py
diff options
context:
space:
mode:
authorBenjamin Esquivel <benjamin.esquivel@linux.intel.com>2015-08-20 13:59:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 22:36:56 +0100
commitb147ba0341d87e077bd2b09ef4355976ecd2d26b (patch)
tree938aedc7e2f114bd28d7024f8a92d112a83cdc3b /lib/bb/utils.py
parent94b3f3d6bdfbfa47f7eb3c3de64940a145b2ddd1 (diff)
downloadbitbake-b147ba0341d87e077bd2b09ef4355976ecd2d26b.tar.gz
utils: Specify dest file name in movefile()
When moving a file via the os.rename function, it was missing the destination file name which caused an OSError [YOCTO#8180] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r--lib/bb/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 5b94432b3..5eec78733 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -741,7 +741,9 @@ def movefile(src, dest, newmtime = None, sstat = None):
renamefailed = 1
if sstat[stat.ST_DEV] == dstat[stat.ST_DEV]:
try:
- os.rename(src, dest)
+ # os.rename needs to know the destination path with file name
+ destfile = os.path.join(dest, os.path.basename(src))
+ os.rename(src, destfile)
renamefailed = 0
except Exception as e:
if e[0] != errno.EXDEV: