diff options
| author | Devendra Tewari <devendra.tewari@gmail.com> | 2021-04-19 11:23:58 -0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-06 11:16:23 +0100 |
| commit | b71375304f393db62e0894af66e9a60bb9a5c8cc (patch) | |
| tree | ac14a351c1c6cd0ba2679c18a4de92c71dee0e7f /scripts/lib/devtool/upgrade.py | |
| parent | 974441aeda1a2e601865743e945e0332c115ef76 (diff) | |
| download | poky-b71375304f393db62e0894af66e9a60bb9a5c8cc.tar.gz | |
classes/lib/scripts: Use bb.utils.rename() instead of os.rename()
Incremental build in Docker fails with:
OSError: [Errno 18] Invalid cross-device link
when source and destination are on different overlay filesystems.
Rather than adding fallback code to every call site, use a new wrapper
in bitbake which detects this case and falls back to shutil.move
which is slower but will handtle the overlay docker filesystems correctly.
[YOCTO #14301]
(From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
| -rw-r--r-- | scripts/lib/devtool/upgrade.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 5a057e95f5..24e3700ece 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
| @@ -71,7 +71,8 @@ def _rename_recipe_dirs(oldpv, newpv, path): | |||
| 71 | if oldfile.find(oldpv) != -1: | 71 | if oldfile.find(oldpv) != -1: |
| 72 | newfile = oldfile.replace(oldpv, newpv) | 72 | newfile = oldfile.replace(oldpv, newpv) |
| 73 | if oldfile != newfile: | 73 | if oldfile != newfile: |
| 74 | os.rename(os.path.join(path, oldfile), os.path.join(path, newfile)) | 74 | bb.utils.rename(os.path.join(path, oldfile), |
| 75 | os.path.join(path, newfile)) | ||
| 75 | 76 | ||
| 76 | def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path): | 77 | def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path): |
| 77 | oldrecipe = os.path.basename(oldrecipe) | 78 | oldrecipe = os.path.basename(oldrecipe) |
