From 656a65b2b84e7d529b89cf5de7eb838f902d84a2 Mon Sep 17 00:00:00 2001 From: Devendra Tewari Date: Mon, 19 Apr 2021 11:23:58 -0300 Subject: 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] Signed-off-by: Richard Purdie --- scripts/combo-layer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/combo-layer') diff --git a/scripts/combo-layer b/scripts/combo-layer index a634dd69d2..045de65642 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -508,7 +508,7 @@ def check_patch(patchfile): f.close() if of: of.close() - os.rename(patchfile + '.tmp', patchfile) + bb.utils.rename(patchfile + '.tmp', patchfile) def drop_to_shell(workdir=None): if not sys.stdin.isatty(): -- cgit 1.2.3-korg