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.
import pickle
print "NOTE: Importing cPickle failed. Falling back to a very slow implementation."
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
# Check dependencies are still valid
depends = self.getVar("__depends", fn, True)
# 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:
bb.debug(2, "Depends Cache: %s is clean" % fn)
if not fn in self.clean:
def mark_dependency(d, f):
if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:])
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"""
def supports(fn, data):
"""Returns true if we have a handler for this file, false otherwise"""