This happens when none of the actual jobs described in the DAX file
consumes and produces any file. In that case, root has no successor
and a dependency to end is created but end has no predecessor and a
dependency from root is created ... that already exists.
/* If some tasks do not take files as input, connect them to the root
* if they don't produce files, connect them to the end node.
*/
/* If some tasks do not take files as input, connect them to the root
* if they don't produce files, connect them to the end node.
*/
- if ((file != root_task) && file->inputs->empty())
- SD_task_dependency_add(nullptr, nullptr, root_task, file);
- if ((file != end_task) && file->outputs->empty())
- SD_task_dependency_add(nullptr, nullptr, file, end_task);
+ if ((file != root_task) && (file != end_task)) {
+ if (file->inputs->empty())
+ SD_task_dependency_add(nullptr, nullptr, root_task, file);
+ if (file->outputs->empty())
+ SD_task_dependency_add(nullptr, nullptr, file, end_task);
+ }