diff options
author | Benjamin Esquivel <benjamin.esquivel@linux.intel.com> | 2015-08-20 13:59:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-01 22:36:56 +0100 |
commit | b147ba0341d87e077bd2b09ef4355976ecd2d26b (patch) | |
tree | 938aedc7e2f114bd28d7024f8a92d112a83cdc3b | |
parent | 94b3f3d6bdfbfa47f7eb3c3de64940a145b2ddd1 (diff) | |
download | bitbake-b147ba0341d87e077bd2b09ef4355976ecd2d26b.zip |
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>
-rw-r--r-- | lib/bb/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 5b94432b..5eec7873 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: |