dsc_depend.py: bug fix on Circular_dsc_order.pkg_fail

When building the last package of a circular chain, the self.next_index
is already been set to "-1". While if this package build failed, we need
to set the self.next_index to the index of the last package instead of
"-=1" as other packages.

Story: 2008862
Task: 45090

Test Plan:
Pass: manually build failure on the last package of a circular chain.

Signed-off-by: ZhangXiao <xiao.zhang@windriver.com>
Change-Id: I5151940a9b8ceafeeda2f7ba2a45f93be38785ca
This commit is contained in:
ZhangXiao 2022-04-19 16:32:36 +08:00
parent 3908e68fb3
commit 48468087cf

View File

@ -210,7 +210,11 @@ class Circular_dsc_order():
self.logger.error('Circular group, %s is not in building stage' % pkg_name)
return False
self.building_index = -1
self.next_index -= 1
if -1 == self.next_index:
self.next_index = len(self.build_order) - 1
else:
self.next_index -= 1
return True
def get_state(self):