diff options
author | Richard Purdie <richard@openedhand.com> | 2006-02-10 10:11:32 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-02-10 10:11:32 +0000 |
commit | 62dc8f47b3c17cf0b1a5d4bf4f0173d5d4fb4c1a (patch) | |
tree | 947a632b694a9a6d561f0df0a768a622e1364570 /bitbake/lib/bb/parse/__init__.py | |
parent | 9a262964c8b5c5a21a68d9b66ab9259b3737999f (diff) | |
download | poky-62dc8f47b3c17cf0b1a5d4bf4f0173d5d4fb4c1a.tar.gz |
Update bitbake to latest bitbake svn
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@262 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/parse/__init__.py')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index b8839c09fd..cb27416061 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -26,6 +26,8 @@ __all__ = [ 'ParseError', 'SkipPackage', 'cached_mtime', 'mark_dependency', | |||
26 | 'supports', 'handle', 'init' ] | 26 | 'supports', 'handle', 'init' ] |
27 | handlers = [] | 27 | handlers = [] |
28 | 28 | ||
29 | import bb, os | ||
30 | |||
29 | class ParseError(Exception): | 31 | class ParseError(Exception): |
30 | """Exception raised when parsing fails""" | 32 | """Exception raised when parsing fails""" |
31 | 33 | ||
@@ -34,13 +36,14 @@ class SkipPackage(Exception): | |||
34 | 36 | ||
35 | __mtime_cache = {} | 37 | __mtime_cache = {} |
36 | def cached_mtime(f): | 38 | def cached_mtime(f): |
37 | import os | ||
38 | if not __mtime_cache.has_key(f): | 39 | if not __mtime_cache.has_key(f): |
39 | __mtime_cache[f] = os.stat(f)[8] | 40 | update_mtime(f) |
40 | return __mtime_cache[f] | 41 | return __mtime_cache[f] |
41 | 42 | ||
43 | def update_mtime(f): | ||
44 | __mtime_cache[f] = os.stat(f)[8] | ||
45 | |||
42 | def mark_dependency(d, f): | 46 | def mark_dependency(d, f): |
43 | import bb, os | ||
44 | if f.startswith('./'): | 47 | if f.startswith('./'): |
45 | f = "%s/%s" % (os.getcwd(), f[2:]) | 48 | f = "%s/%s" % (os.getcwd(), f[2:]) |
46 | deps = (bb.data.getVar('__depends', d) or "").split() | 49 | deps = (bb.data.getVar('__depends', d) or "").split() |