summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2006-04-29 17:37:44 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2006-04-29 17:37:44 +0000
commitbe990a10b7437529f0c6d2e21f2da28101d6e070 (patch)
tree3f98635f17b157ced0b96662fdc948b98a550e96
parentf35d94400aef4d61afd9a6e19bd2dd3681fe17cc (diff)
downloadbitbake-be990a10b7437529f0c6d2e21f2da28101d6e070.tar.gz
bitbake-1.4/lib/bb/cache.py:
bitbake-1.4/lib/bb/parse/__init__.py: Attachment http://bugs.openembedded.org/attachment.cgi?id=679 from #918 from bug #918 to work with spaces in filenames properly. This changed the type of __depends and we need to update the cache version due this.
-rw-r--r--lib/bb/cache.py19
-rw-r--r--lib/bb/parse/__init__.py6
2 files changed, 11 insertions, 14 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index d4be9d7ff..e3e0d6a16 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -40,7 +40,8 @@ except ImportError:
import pickle
print "NOTE: Importing cPickle failed. Falling back to a very slow implementation."
-__cache_version__ = "123"
+# __cache_version__ = "123"
+__cache_version__ = "124" # changes the __depends structure
class Cache:
"""
@@ -192,16 +193,12 @@ class Cache:
# Check dependencies are still valid
depends = self.getVar("__depends", fn, True)
- if depends:
- deps = depends.split(" ")
- for dep in deps:
- (f,old_mtime_s) = dep.split("@")
- old_mtime = int(old_mtime_s)
- new_mtime = bb.parse.cached_mtime(f)
- if (new_mtime > old_mtime):
- bb.debug(2, "Cache: %s's dependency %s changed" % (fn, f))
- self.remove(fn)
- return False
+ for f,old_mtime in depends:
+ new_mtime = bb.parse.cached_mtime(f)
+ if (new_mtime > old_mtime):
+ bb.debug(2, "Cache: %s's dependency %s changed" % (fn, f))
+ self.remove(fn)
+ return False
bb.debug(2, "Depends Cache: %s is clean" % fn)
if not fn in self.clean:
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index cb2741606..58e17d154 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -46,9 +46,9 @@ def update_mtime(f):
def mark_dependency(d, f):
if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:])
- deps = (bb.data.getVar('__depends', d) or "").split()
- deps.append("%s@%s" % (f, cached_mtime(f)))
- bb.data.setVar('__depends', " ".join(deps), d)
+ deps = bb.data.getVar('__depends', d) or []
+ deps.append( (f, cached_mtime(f)) )
+ bb.data.setVar('__depends', deps, d)
def supports(fn, data):
"""Returns true if we have a handler for this file, false otherwise"""