From 89c730ec61bdfbc1e3034da36e1a5edb9ff7d6ae Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 4 Mar 2019 23:25:25 +0100 Subject: [PATCH] Bug in coriolisEnv.py. Avoid looping in Katana repair stage. * In Katana::RoutingEvent::_processRepair(), do no reschedule perpandiculars that are already in repair mode, they may loop with repackperpandiculars(). --- bootstrap/coriolisEnv.py | 4 ++-- katana/src/RoutingEvent.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index f0ab9b89..dea6d07e 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -235,13 +235,13 @@ if __name__ == "__main__": coriolisTop = "/usr" sysconfDir = scriptDir shellMessage = "Using system-wide Coriolis 2 (/usr)" - else + else: m = reDevtoolset.match( scriptDir ) if m: coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version') sysconfDir = scriptDir shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \ - { 'v':m.group('version') } + % { 'v':m.group('version') } elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"): rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x" coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) diff --git a/katana/src/RoutingEvent.cpp b/katana/src/RoutingEvent.cpp index a586963b..05f4980f 100644 --- a/katana/src/RoutingEvent.cpp +++ b/katana/src/RoutingEvent.cpp @@ -602,7 +602,8 @@ namespace Katana { cdebug_log(159,0) << "| " << perpandicular << endl; fsm.addAction( perpandicular, SegmentAction::SelfInsert ); DataNegociate* data = perpandicular->getDataNegociate(); - if (data) data->setState( DataNegociate::Repair ); + if (data and (data->getState() < DataNegociate::Repair)) + data->setState( DataNegociate::Repair ); } } fsm.doActions();