summaryrefslogtreecommitdiffstats
path: root/bitbake/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-03 12:33:08 +0100
commitf321655ad8fe170e17e210d9fa15e1aaf51211dd (patch)
treeed4473278e8aa6543589b2c36be464cb48d1cecc /bitbake/lib/bb/utils.py
parent383450c78a46060de9a483d4cce5955136dca807 (diff)
downloadpoky-f321655ad8fe170e17e210d9fa15e1aaf51211dd.tar.gz
bitbake: 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] (Bitbake rev: b147ba0341d87e077bd2b09ef4355976ecd2d26b) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 5b94432b37..5eec787336 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -741,7 +741,9 @@ def movefile(src, dest, newmtime = None, sstat = None):
741 renamefailed = 1 741 renamefailed = 1
742 if sstat[stat.ST_DEV] == dstat[stat.ST_DEV]: 742 if sstat[stat.ST_DEV] == dstat[stat.ST_DEV]:
743 try: 743 try:
744 os.rename(src, dest) 744 # os.rename needs to know the destination path with file name
745 destfile = os.path.join(dest, os.path.basename(src))
746 os.rename(src, destfile)
745 renamefailed = 0 747 renamefailed = 0
746 except Exception as e: 748 except Exception as e:
747 if e[0] != errno.EXDEV: 749 if e[0] != errno.EXDEV: