From f321655ad8fe170e17e210d9fa15e1aaf51211dd Mon Sep 17 00:00:00 2001 From: Benjamin Esquivel Date: Thu, 20 Aug 2015 13:59:58 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitbake') 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): 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: -- cgit v1.2.3-54-g00ecf