bitbake: Merge further fixes from upstream 1.8 branch
* Make the test functionality work * Optimise BBPATH handling when changing directory * Optimise file globing for BBFILES Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
1ca980646d
commit
107a9da006
|
@ -1129,4 +1129,5 @@ def dep_opconvert(mysplit, myuse):
|
|||
|
||||
if __name__ == "__main__":
|
||||
import doctest, bb
|
||||
bb.msg.set_debug_level(0)
|
||||
doctest.testmod(bb)
|
||||
|
|
|
@ -281,13 +281,13 @@ class BBCooker:
|
|||
print >> depends_file, '"%s" -> "%s"' % (pn, depend)
|
||||
rdepends = self.status.rundeps[fn]
|
||||
for package in rdepends:
|
||||
for rdepend in rdepends[package]:
|
||||
print >> depends_file, '"%s" -> "%s" [style=dashed]' % (package, rdepend)
|
||||
for rdepend in re.findall("([\w.-]+)(\ \(.+\))?", rdepends[package]):
|
||||
print >> depends_file, '"%s" -> "%s%s" [style=dashed]' % (package, rdepend[0], rdepend[1])
|
||||
packages.append(package)
|
||||
rrecs = self.status.runrecs[fn]
|
||||
for package in rrecs:
|
||||
for rdepend in rrecs[package]:
|
||||
print >> depends_file, '"%s" -> "%s" [style=dashed]' % (package, rdepend)
|
||||
for rdepend in re.findall("([\w.-]+)(\ \(.+\))?", rrecs[package]):
|
||||
print >> depends_file, '"%s" -> "%s%s" [style=dashed]' % (package, rdepend[0], rdepend[1])
|
||||
if not package in packages:
|
||||
packages.append(package)
|
||||
for package in packages:
|
||||
|
@ -688,7 +688,11 @@ class BBCooker:
|
|||
if dirfiles:
|
||||
newfiles += dirfiles
|
||||
continue
|
||||
newfiles += glob.glob(f) or [ f ]
|
||||
else:
|
||||
globbed = glob.glob(f)
|
||||
if not globbed and os.path.exists(f):
|
||||
globbed = [f]
|
||||
newfiles += globbed
|
||||
|
||||
bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1)
|
||||
|
||||
|
@ -701,9 +705,8 @@ class BBCooker:
|
|||
bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.")
|
||||
|
||||
finalfiles = []
|
||||
for i in xrange( len( newfiles ) ):
|
||||
f = newfiles[i]
|
||||
if bbmask and bbmask_compiled.search(f):
|
||||
for f in newfiles:
|
||||
if bbmask_compiled.search(f):
|
||||
bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f)
|
||||
masked += 1
|
||||
continue
|
||||
|
|
|
@ -553,7 +553,9 @@ def inherits_class(klass, d):
|
|||
def _test():
|
||||
"""Start a doctest run on this module"""
|
||||
import doctest
|
||||
import bb
|
||||
from bb import data
|
||||
bb.msg.set_debug_level(0)
|
||||
doctest.testmod(data)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -155,12 +155,6 @@ def handle(fn, d, include = 0):
|
|||
f = open(fn,'r')
|
||||
abs_fn = fn
|
||||
|
||||
if ext != ".bbclass":
|
||||
dname = os.path.dirname(abs_fn)
|
||||
if bbpath[0] != dname:
|
||||
bbpath.insert(0, dname)
|
||||
data.setVar('BBPATH', ":".join(bbpath), d)
|
||||
|
||||
if include:
|
||||
bb.parse.mark_dependency(d, abs_fn)
|
||||
|
||||
|
|
|
@ -102,6 +102,13 @@ def include(oldfn, fn, data, error_out):
|
|||
fn = bb.data.expand(fn, data)
|
||||
oldfn = bb.data.expand(oldfn, data)
|
||||
|
||||
if not os.path.isabs(fn):
|
||||
dname = os.path.dirname(oldfn)
|
||||
bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1))
|
||||
abs_fn = bb.which(bbpath, fn)
|
||||
if abs_fn:
|
||||
fn = abs_fn
|
||||
|
||||
from bb.parse import handle
|
||||
try:
|
||||
ret = handle(fn, data, True)
|
||||
|
|
Loading…
Reference in New Issue