From d621120564872b92117a48603680fc5fcc99037d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org>
Date: Tue, 19 Jan 2016 20:09:57 +0000
Subject: [PATCH] Merge branch 'feature/dunecontrol-less-version-checks' into
 'master'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[dunecontrol] Check less often the version for module dependencies

Similar to update, status, svn, git, exec, and bexec don't check
whether the versions for dependencies are fulfilled.

This could fix #9

See merge request !28
(cherry picked from commit 47255e4f512ad4da72d0d2099503e9b9da578a7f)

Signed-off-by: Steffen Müthing <muething@dune-project.org>
---
 bin/dunecontrol | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/dunecontrol b/bin/dunecontrol
index 224ccb1b9..360b7d9db 100755
--- a/bin/dunecontrol
+++ b/bin/dunecontrol
@@ -325,6 +325,9 @@ esac'
 # list of all dunecontrol commands
 COMMANDS="printdeps vcsetup update autogen configure make all exec bexec status svn git"
 
+# list of dunecontrol commands for which the version check is skipped by default
+COMMANDSTOSKIPVERSIONCHECK="update status svn git exec bexec"
+
 # help string for the commands
 printdeps_HELP="print recursive dependencies of a module"
 vcsetup_HELP="setup version control repository (Git etc.) or working copy (SVN)"
@@ -1287,7 +1290,10 @@ EOF
       fi
     fi
     set -e
-    if test "$1" = "update"; then export SKIPVERSIONCHECK=yes; fi
+    # skip version check if command is in according list
+    if grep -q "$1" <<<"$COMMANDSTOSKIPVERSIONCHECK" ; then
+      export SKIPVERSIONCHECK=yes;
+    fi
     check_commands "$@"
     create_module_list
     NAMES=""
-- 
GitLab