]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Log when we can't rename in move_tree()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Apr 2024 16:00:35 +0000 (18:00 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Apr 2024 16:32:31 +0000 (18:32 +0200)
Can help explain why mkosi is slower than it should be.

mkosi/tree.py

index 53a8ae550693aeb6607a77e24d687859be865508..73dfca6450db7af594504545c9f78125387a72df 100644 (file)
@@ -2,6 +2,7 @@
 
 import contextlib
 import errno
+import logging
 import shutil
 import subprocess
 import tempfile
@@ -187,6 +188,9 @@ def move_tree(
         if e.errno != errno.EXDEV:
             raise e
 
+        logging.info(
+            f"Could not rename {src} to {dst} as they are located on different devices, falling back to copying"
+        )
         copy_tree(src, dst, use_subvolumes=use_subvolumes, tools=tools, sandbox=sandbox)
         rmtree(src, tools=tools, sandbox=sandbox)