summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager/ipk/__init__.py
diff options
context:
space:
mode:
authorDevendra Tewari <devendra.tewari@gmail.com>2021-04-19 11:23:58 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-23 10:12:12 +0100
commit8d48138e9b1f3577cfba64b4757b576c27c6ef04 (patch)
tree9c67de3630ffde438b70e92cf6864103233bc149 /meta/lib/oe/package_manager/ipk/__init__.py
parentf2d1523b19cb066a4a06609f036822fe4a8b43f0 (diff)
downloadopenembedded-core-contrib-8d48138e9b1f3577cfba64b4757b576c27c6ef04.tar.gz
classes/lib/scripts: Use shutil.move when os.rename fails
Incremental build in Docker fails with: OSError: [Errno 18] Invalid cross-device link when source and destination are on different overlay filesystems. This change handles error with os.rename and retries with shutil.move. The reason os.rename is still used is because shutil.move is too slow for speed sensitive sections of code. [YOCTO #14301] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager/ipk/__init__.py')
-rw-r--r--meta/lib/oe/package_manager/ipk/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index da488c1c7f..2aa21949f3 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -213,7 +213,10 @@ class OpkgPM(OpkgDpkgPM):
tmp_sf.write(status)
- os.rename(status_file + ".tmp", status_file)
+ try:
+ os.rename(status_file + ".tmp", status_file)
+ except OSError:
+ shutil.move(status_file + ".tmp", status_file)
def _create_custom_config(self):
bb.note("Building from feeds activated!")