diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 5e735d3fa7..2abf518ece 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -822,7 +822,7 @@ def copyfile(src, dest, newmtime = None, sstat = None): | |||
822 | if not sstat: | 822 | if not sstat: |
823 | sstat = os.lstat(src) | 823 | sstat = os.lstat(src) |
824 | except Exception as e: | 824 | except Exception as e: |
825 | logger.warn("copyfile: stat of %s failed (%s)" % (src, e)) | 825 | logger.warning("copyfile: stat of %s failed (%s)" % (src, e)) |
826 | return False | 826 | return False |
827 | 827 | ||
828 | destexists = 1 | 828 | destexists = 1 |
@@ -849,7 +849,7 @@ def copyfile(src, dest, newmtime = None, sstat = None): | |||
849 | #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) | 849 | #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) |
850 | return os.lstat(dest) | 850 | return os.lstat(dest) |
851 | except Exception as e: | 851 | except Exception as e: |
852 | logger.warn("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e)) | 852 | logger.warning("copyfile: failed to create symlink %s to %s (%s)" % (dest, target, e)) |
853 | return False | 853 | return False |
854 | 854 | ||
855 | if stat.S_ISREG(sstat[stat.ST_MODE]): | 855 | if stat.S_ISREG(sstat[stat.ST_MODE]): |
@@ -864,7 +864,7 @@ def copyfile(src, dest, newmtime = None, sstat = None): | |||
864 | shutil.copyfile(src, dest + "#new") | 864 | shutil.copyfile(src, dest + "#new") |
865 | os.rename(dest + "#new", dest) | 865 | os.rename(dest + "#new", dest) |
866 | except Exception as e: | 866 | except Exception as e: |
867 | logger.warn("copyfile: copy %s to %s failed (%s)" % (src, dest, e)) | 867 | logger.warning("copyfile: copy %s to %s failed (%s)" % (src, dest, e)) |
868 | return False | 868 | return False |
869 | finally: | 869 | finally: |
870 | if srcchown: | 870 | if srcchown: |
@@ -875,13 +875,13 @@ def copyfile(src, dest, newmtime = None, sstat = None): | |||
875 | #we don't yet handle special, so we need to fall back to /bin/mv | 875 | #we don't yet handle special, so we need to fall back to /bin/mv |
876 | a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'") | 876 | a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'") |
877 | if a[0] != 0: | 877 | if a[0] != 0: |
878 | logger.warn("copyfile: failed to copy special file %s to %s (%s)" % (src, dest, a)) | 878 | logger.warning("copyfile: failed to copy special file %s to %s (%s)" % (src, dest, a)) |
879 | return False # failure | 879 | return False # failure |
880 | try: | 880 | try: |
881 | os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID]) | 881 | os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID]) |
882 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown | 882 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown |
883 | except Exception as e: | 883 | except Exception as e: |
884 | logger.warn("copyfile: failed to chown/chmod %s (%s)" % (dest, e)) | 884 | logger.warning("copyfile: failed to chown/chmod %s (%s)" % (dest, e)) |
885 | return False | 885 | return False |
886 | 886 | ||
887 | if newmtime: | 887 | if newmtime: |