[Lunar-commits] <lunar> rework modules on lunar renew and only update know depends

Peter de Ridder peter at lunar-linux.org
Sat Oct 26 19:56:32 CEST 2013


commit fecd23e6662265aa33e49f05b016d5e6d253b5ec
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Sat, 26 Oct 2013 10:28:57 -0700
URL: https://github.com/lunar-linux/lunar/commit/fecd23e6662265aa33e49f05b016d5e6d253b5ec

rework modules on lunar renew and only update know depends
---
  libs/check.lunar   | +4/-2     
  libs/modules.lunar | +5/-0     
  2 files changed, 9 insertions(+), 2 deletions(-)

--- a/libs/check.lunar
+++ b/libs/check.lunar
@@ -37,11 +37,13 @@ rework_module() {
 		if module_exiled $DEP ; then
 			echo "$MODULE:$DEP:off:optional:$2:$3"
 		else
-			if module_installed $DEP ; then
+			# check for the current depend selection
+			if grep -q "^$1:$2:on:" "$DEPENDS_STATUS_BACKUP" ; then
 				echo "$MODULE:$DEP:on:optional:$2:$3"
-			else
+			elif grep -q "^$1:$2:off:" "$DEPENDS_STATUS_BACKUP" ; then
 				echo "$MODULE:$DEP:off:optional:$2:$3"
 			fi
+			# if we don't know the answer we leave it open for the user to decide
 		fi
 	}
 
--- a/libs/modules.lunar
+++ b/libs/modules.lunar
@@ -733,6 +733,11 @@ update_modules() {
     return 255
   fi
 
+  verbose_msg "Rework all module dependencies"
+  for MODULE in $LIST ; do
+    rework_module $MODULE
+  done
+
   verbose_msg "Checking for lunar or theedge"
   for MODULE in $LIST ; do
     if [[ "$MODULE" == "lunar" ]] || [[ "$MODULE" == "theedge" ]] ; then




More information about the Lunar-commits mailing list