mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
yocto-compat-layer.py: tolerate broken world builds during signature diff
The "test_signatures" test ignored a broken world build when getting signatures, but the code which then tried to analyze a difference found by the test didn't, which prevented printing the difference. (From OE-Core rev: e8416554dfc9d4196543279a4845f6c0671f3e5c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
158575af9d
commit
afedb883da
@@ -290,7 +290,7 @@ def get_signatures(builddir, failsafe=False, machine=None):
|
|||||||
|
|
||||||
return (sigs, tune2tasks)
|
return (sigs, tune2tasks)
|
||||||
|
|
||||||
def get_depgraph(targets=['world']):
|
def get_depgraph(targets=['world'], failsafe=False):
|
||||||
'''
|
'''
|
||||||
Returns the dependency graph for the given target(s).
|
Returns the dependency graph for the given target(s).
|
||||||
The dependency graph is taken directly from DepTreeEvent.
|
The dependency graph is taken directly from DepTreeEvent.
|
||||||
@@ -309,6 +309,11 @@ def get_depgraph(targets=['world']):
|
|||||||
elif isinstance(event, bb.command.CommandCompleted):
|
elif isinstance(event, bb.command.CommandCompleted):
|
||||||
break
|
break
|
||||||
elif isinstance(event, bb.event.NoProvider):
|
elif isinstance(event, bb.event.NoProvider):
|
||||||
|
if failsafe:
|
||||||
|
# The event is informational, we will get information about the
|
||||||
|
# remaining dependencies eventually and thus can ignore this
|
||||||
|
# here like we do in get_signatures(), if desired.
|
||||||
|
continue
|
||||||
if event._reasons:
|
if event._reasons:
|
||||||
raise RuntimeError('Nothing provides %s: %s' % (event._item, event._reasons))
|
raise RuntimeError('Nothing provides %s: %s' % (event._item, event._reasons))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class CommonCompatLayer(OECompatLayerTestCase):
|
|||||||
def graph2sig(task):
|
def graph2sig(task):
|
||||||
pn, taskname = task.rsplit('.', 1)
|
pn, taskname = task.rsplit('.', 1)
|
||||||
return pn + ':' + taskname
|
return pn + ':' + taskname
|
||||||
depgraph = get_depgraph()
|
depgraph = get_depgraph(failsafe=True)
|
||||||
depends = depgraph['tdepends']
|
depends = depgraph['tdepends']
|
||||||
|
|
||||||
# If a task A has a changed signature, but none of its
|
# If a task A has a changed signature, but none of its
|
||||||
|
|||||||
Reference in New Issue
Block a user