diff options
| -rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 7f1562e66e..eee8d9cddb 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
| @@ -27,6 +27,7 @@ File parsers for the BitBake build tools. | |||
| 27 | handlers = [] | 27 | handlers = [] |
| 28 | 28 | ||
| 29 | import os | 29 | import os |
| 30 | import stat | ||
| 30 | import logging | 31 | import logging |
| 31 | import bb | 32 | import bb |
| 32 | import bb.utils | 33 | import bb.utils |
| @@ -43,19 +44,19 @@ class SkipPackage(Exception): | |||
| 43 | __mtime_cache = {} | 44 | __mtime_cache = {} |
| 44 | def cached_mtime(f): | 45 | def cached_mtime(f): |
| 45 | if f not in __mtime_cache: | 46 | if f not in __mtime_cache: |
| 46 | __mtime_cache[f] = os.stat(f)[8] | 47 | __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] |
| 47 | return __mtime_cache[f] | 48 | return __mtime_cache[f] |
| 48 | 49 | ||
| 49 | def cached_mtime_noerror(f): | 50 | def cached_mtime_noerror(f): |
| 50 | if f not in __mtime_cache: | 51 | if f not in __mtime_cache: |
| 51 | try: | 52 | try: |
| 52 | __mtime_cache[f] = os.stat(f)[8] | 53 | __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] |
| 53 | except OSError: | 54 | except OSError: |
| 54 | return 0 | 55 | return 0 |
| 55 | return __mtime_cache[f] | 56 | return __mtime_cache[f] |
| 56 | 57 | ||
| 57 | def update_mtime(f): | 58 | def update_mtime(f): |
| 58 | __mtime_cache[f] = os.stat(f)[8] | 59 | __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] |
| 59 | return __mtime_cache[f] | 60 | return __mtime_cache[f] |
| 60 | 61 | ||
| 61 | def mark_dependency(d, f): | 62 | def mark_dependency(d, f): |
