From 84f7ee9a272006e1cf585293dafb45e9d8092477 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 2 Aug 2012 17:05:50 +0200 Subject: [PATCH] Added: #1440 Implementation notes --HG-- branch : build_pipeline_v3 --- .../pipeline/service/module_pipeline_slave.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp index 6502b84d9..1518f2d93 100644 --- a/code/nel/tools/pipeline/service/module_pipeline_slave.cpp +++ b/code/nel/tools/pipeline/service/module_pipeline_slave.cpp @@ -614,13 +614,13 @@ public: { nldebug("Output files may have changed, find out which output files are part of these input files"); m_SubTaskResult = FINISH_SUCCESS; - return needsToBeRebuildSubByOutput(inputPaths); + return needsToBeRebuildSubByOutput(inputPaths, false); } } else // input files have changed { // TODO: FIND IF ALL INPUT FILES HAVE A .output FILE - bool allInputFilesHaveOutputFile = (rand()) % 2 == 0; // ################################### + bool allInputFilesHaveOutputFile = (rand()) % 2 == 0; // ###################################fa if (!allInputFilesHaveOutputFile) { nldebug("Not all input files have an .output files, rebuild"); @@ -631,19 +631,22 @@ public: { nldebug("Output files may or may not be up to date, find out more, after the break"); m_SubTaskResult = FINISH_SUCCESS; - return needsToBeRebuildSubByOutput(inputPaths); + return needsToBeRebuildSubByOutput(inputPaths, true); } } } - bool needsToBeRebuildSubByOutput(const std::vector &inputPaths) + bool needsToBeRebuildSubByOutput(const std::vector &inputPaths, bool inputChanged) { if (m_SubTaskResult != FINISH_SUCCESS) return false; // Cannot continue on previous failure. m_SubTaskResult = FINISH_NOT; - // TODO: READ THE .output FILES AND PASS ON TO needsToBeRebuilt(2) + // TODO: READ THE .output FILES (AND PASS ON TO needsToBeRebuilt(2)) + // (if inputChanged) IF INPUT CACHED LastUpdate > .output BuildStart (project of file-based? - should not matter... prefer same as project start! (make it ProcessStart)) THEN NEED REBUILD + // OTHERWISE IF NO CHANGES SINCE OUTPUT BUILD, PASS TO needsToBeRebuilt(2) TO VERIFY THE OUTPUT PATHS IF ANYTHING MESSED WITH + return true; } @@ -653,6 +656,8 @@ public: /// Output paths can ONLY be files! bool needsToBeRebuilt(const std::vector &inputPaths, const std::vector &outputPaths) { + // TODO: REWRITE THIS + if (m_SubTaskResult != FINISH_SUCCESS) return false; // Cannot continue on previous failure.