diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/utils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index e92d5feb2e..95b3c89805 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -753,7 +753,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
753 | if not sstat: | 753 | if not sstat: |
754 | sstat = os.lstat(src) | 754 | sstat = os.lstat(src) |
755 | except Exception as e: | 755 | except Exception as e: |
756 | print("movefile: Stating source file failed...", e) | 756 | logger.warning("movefile: Stating source file failed...", e) |
757 | return None | 757 | return None |
758 | 758 | ||
759 | destexists = 1 | 759 | destexists = 1 |
@@ -781,7 +781,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
781 | os.unlink(src) | 781 | os.unlink(src) |
782 | return os.lstat(dest) | 782 | return os.lstat(dest) |
783 | except Exception as e: | 783 | except Exception as e: |
784 | print("movefile: failed to properly create symlink:", dest, "->", target, e) | 784 | logger.warning("movefile: failed to properly create symlink:", dest, "->", target, e) |
785 | return None | 785 | return None |
786 | 786 | ||
787 | renamefailed = 1 | 787 | renamefailed = 1 |
@@ -798,7 +798,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
798 | except Exception as e: | 798 | except Exception as e: |
799 | if e.errno != errno.EXDEV: | 799 | if e.errno != errno.EXDEV: |
800 | # Some random error. | 800 | # Some random error. |
801 | print("movefile: Failed to move", src, "to", dest, e) | 801 | logger.warning("movefile: Failed to move", src, "to", dest, e) |
802 | return None | 802 | return None |
803 | # Invalid cross-device-link 'bind' mounted or actually Cross-Device | 803 | # Invalid cross-device-link 'bind' mounted or actually Cross-Device |
804 | 804 | ||
@@ -810,13 +810,13 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
810 | bb.utils.rename(destpath + "#new", destpath) | 810 | bb.utils.rename(destpath + "#new", destpath) |
811 | didcopy = 1 | 811 | didcopy = 1 |
812 | except Exception as e: | 812 | except Exception as e: |
813 | print('movefile: copy', src, '->', dest, 'failed.', e) | 813 | logger.warning('movefile: copy', src, '->', dest, 'failed.', e) |
814 | return None | 814 | return None |
815 | else: | 815 | else: |
816 | #we don't yet handle special, so we need to fall back to /bin/mv | 816 | #we don't yet handle special, so we need to fall back to /bin/mv |
817 | a = getstatusoutput("/bin/mv -f " + "'" + src + "' '" + dest + "'") | 817 | a = getstatusoutput("/bin/mv -f " + "'" + src + "' '" + dest + "'") |
818 | if a[0] != 0: | 818 | if a[0] != 0: |
819 | print("movefile: Failed to move special file:" + src + "' to '" + dest + "'", a) | 819 | logger.warning("movefile: Failed to move special file:" + src + "' to '" + dest + "'", a) |
820 | return None # failure | 820 | return None # failure |
821 | try: | 821 | try: |
822 | if didcopy: | 822 | if didcopy: |
@@ -824,7 +824,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
824 | os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown | 824 | os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown |
825 | os.unlink(src) | 825 | os.unlink(src) |
826 | except Exception as e: | 826 | except Exception as e: |
827 | print("movefile: Failed to chown/chmod/unlink", dest, e) | 827 | logger.warning("movefile: Failed to chown/chmod/unlink", dest, e) |
828 | return None | 828 | return None |
829 | 829 | ||
830 | if newmtime: | 830 | if newmtime: |