diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-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 512cc4eb76..19ed68ea62 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -751,7 +751,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
751 | if not sstat: | 751 | if not sstat: |
752 | sstat = os.lstat(src) | 752 | sstat = os.lstat(src) |
753 | except Exception as e: | 753 | except Exception as e: |
754 | print("movefile: Stating source file failed...", e) | 754 | logger.warning("movefile: Stating source file failed...", e) |
755 | return None | 755 | return None |
756 | 756 | ||
757 | destexists = 1 | 757 | destexists = 1 |
@@ -779,7 +779,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
779 | os.unlink(src) | 779 | os.unlink(src) |
780 | return os.lstat(dest) | 780 | return os.lstat(dest) |
781 | except Exception as e: | 781 | except Exception as e: |
782 | print("movefile: failed to properly create symlink:", dest, "->", target, e) | 782 | logger.warning("movefile: failed to properly create symlink:", dest, "->", target, e) |
783 | return None | 783 | return None |
784 | 784 | ||
785 | renamefailed = 1 | 785 | renamefailed = 1 |
@@ -796,7 +796,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
796 | except Exception as e: | 796 | except Exception as e: |
797 | if e.errno != errno.EXDEV: | 797 | if e.errno != errno.EXDEV: |
798 | # Some random error. | 798 | # Some random error. |
799 | print("movefile: Failed to move", src, "to", dest, e) | 799 | logger.warning("movefile: Failed to move", src, "to", dest, e) |
800 | return None | 800 | return None |
801 | # Invalid cross-device-link 'bind' mounted or actually Cross-Device | 801 | # Invalid cross-device-link 'bind' mounted or actually Cross-Device |
802 | 802 | ||
@@ -808,13 +808,13 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
808 | bb.utils.rename(destpath + "#new", destpath) | 808 | bb.utils.rename(destpath + "#new", destpath) |
809 | didcopy = 1 | 809 | didcopy = 1 |
810 | except Exception as e: | 810 | except Exception as e: |
811 | print('movefile: copy', src, '->', dest, 'failed.', e) | 811 | logger.warning('movefile: copy', src, '->', dest, 'failed.', e) |
812 | return None | 812 | return None |
813 | else: | 813 | else: |
814 | #we don't yet handle special, so we need to fall back to /bin/mv | 814 | #we don't yet handle special, so we need to fall back to /bin/mv |
815 | a = getstatusoutput("/bin/mv -f " + "'" + src + "' '" + dest + "'") | 815 | a = getstatusoutput("/bin/mv -f " + "'" + src + "' '" + dest + "'") |
816 | if a[0] != 0: | 816 | if a[0] != 0: |
817 | print("movefile: Failed to move special file:" + src + "' to '" + dest + "'", a) | 817 | logger.warning("movefile: Failed to move special file:" + src + "' to '" + dest + "'", a) |
818 | return None # failure | 818 | return None # failure |
819 | try: | 819 | try: |
820 | if didcopy: | 820 | if didcopy: |
@@ -822,7 +822,7 @@ def movefile(src, dest, newmtime = None, sstat = None): | |||
822 | os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown | 822 | os.chmod(destpath, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown |
823 | os.unlink(src) | 823 | os.unlink(src) |
824 | except Exception as e: | 824 | except Exception as e: |
825 | print("movefile: Failed to chown/chmod/unlink", dest, e) | 825 | logger.warning("movefile: Failed to chown/chmod/unlink", dest, e) |
826 | return None | 826 | return None |
827 | 827 | ||
828 | if newmtime: | 828 | if newmtime: |