summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/__init__.py7
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.
27handlers = [] 27handlers = []
28 28
29import os 29import os
30import stat
30import logging 31import logging
31import bb 32import bb
32import bb.utils 33import bb.utils
@@ -43,19 +44,19 @@ class SkipPackage(Exception):
43__mtime_cache = {} 44__mtime_cache = {}
44def cached_mtime(f): 45def 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
49def cached_mtime_noerror(f): 50def 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
57def update_mtime(f): 58def 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
61def mark_dependency(d, f): 62def mark_dependency(d, f):