From 9c82184e789cf05787c0ae21feb4c6bf325d1662 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Tue, 10 Jul 2012 17:49:49 +0000
Subject: [PATCH] [dunecontrol] actually depmode and mainmode where the same...
 only compute one of them

[[Imported from SVN: r6859]]
---
 lib/dunemodules.lib | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/dunemodules.lib b/lib/dunemodules.lib
index 95eddc890..f8c865269 100644
--- a/lib/dunemodules.lib
+++ b/lib/dunemodules.lib
@@ -385,12 +385,11 @@ _sort_module() {
     echo "ERROR: invalid module name $module" >&2
     exit 1
   fi
-  mainmode=$(test $mode = MAIN && echo DEPS || echo $mode)
-  if eval test "x\$SORT_${mainmode}_DONE_$module" != "xyes"; then
+  depmode=$(test $mode = SUGS && echo SUGS || echo DEPS)
+  if eval test "x\$SORT_${depmode}_DONE_$module" != "xyes"; then
     # stop any recursion
-    export SORT_${mainmode}_DONE_$module=yes
+    export SORT_${depmode}_DONE_$module=yes
     # resolve dependencies
-    depmode=$(test $mode = SUGS && echo SUGS || echo DEPS)
     _check_deps $module DEPS $depmode # it might happen that the DEPS are actually SUGS
     # resolve suggestions
     _check_deps $module SUGS SUGS
-- 
GitLab