diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 5b7e7a3608..ad0aa68b27 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -21,7 +21,8 @@ BitBake Utility Functions | |||
21 | 21 | ||
22 | separators = ".-" | 22 | separators = ".-" |
23 | 23 | ||
24 | import re, fcntl, os, types, bb, string | 24 | import re, fcntl, os, types, bb, string, stat, shutil |
25 | from commands import getstatusoutput | ||
25 | 26 | ||
26 | def explode_version(s): | 27 | def explode_version(s): |
27 | r = [] | 28 | r = [] |
@@ -516,7 +517,7 @@ def movefile(src,dest,newmtime=None,sstat=None): | |||
516 | return None # failure | 517 | return None # failure |
517 | try: | 518 | try: |
518 | if didcopy: | 519 | if didcopy: |
519 | missingos.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) | 520 | os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) |
520 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown | 521 | os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown |
521 | os.unlink(src) | 522 | os.unlink(src) |
522 | except Exception, e: | 523 | except Exception, e: |
@@ -536,8 +537,6 @@ def copyfile(src,dest,newmtime=None,sstat=None): | |||
536 | attributes; mtime will be preserved even when moving across | 537 | attributes; mtime will be preserved even when moving across |
537 | filesystems. Returns true on success and false on failure. | 538 | filesystems. Returns true on success and false on failure. |
538 | """ | 539 | """ |
539 | import os, stat, shutil | ||
540 | |||
541 | #print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")" | 540 | #print "copyfile("+src+","+dest+","+str(newmtime)+","+str(sstat)+")" |
542 | try: | 541 | try: |
543 | if not sstat: | 542 | if not sstat: |