[Lunar-commits] <lunar> Removing unnecessary module_held checks.

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


commit a0aefa8bd570886c804352c56a30b412cabe4bc6
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Tue, 22 Oct 2013 11:04:44 -0700
URL: https://github.com/lunar-linux/lunar/commit/a0aefa8bd570886c804352c56a30b412cabe4bc6

Removing unnecessary module_held checks.

module_held implies module_installed
---
  libs/build.lunar   | +1/-1     
  libs/depends.lunar | +1/-2     
  prog/lunar         | +1/-3     
  3 files changed, 3 insertions(+), 6 deletions(-)

--- a/libs/build.lunar
+++ b/libs/build.lunar
@@ -109,7 +109,7 @@ export_ld()  {
 
 prepare_install() {
   debug_msg "prepare_install ($@)"
-  if module_installed $MODULE || module_held $MODULE ; then
+  if module_installed $MODULE ; then
     message  "${MESSAGE_COLOR}Preparing to install"  \
              "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
     save_libraries
--- a/libs/depends.lunar
+++ b/libs/depends.lunar
@@ -335,8 +335,7 @@ satisfy_depends()  {
       fi
     elif [ "$DEP_STATUS" == "off" ] || module_exiled $DEP_MODULE ; then
       OPTS="$OPTS $DEP_OFF"
-    elif [ "$DEP_STATUS" == "on" ] && ! module_installed $DEP_MODULE && \
-        ! module_held $DEP_MODULE ; then
+    elif [ "$DEP_STATUS" == "on" ] && ! module_installed $DEP_MODULE ; then
       if SINGLE_MODULE=1 lin $DOWNLOAD_ONLY $SILENT $COMPILE $DEP_MODULE ; then
         OPTS="$OPTS $DEP_ON"
       else
--- a/prog/lunar
+++ b/prog/lunar
@@ -70,7 +70,6 @@ EOF
 show_modules()	{ 
   for  MODULE in `list_modules "$1"`;  do
     if  !  module_installed  $MODULE  &&
-        !  module_held       $MODULE  &&
         !  module_exiled     $MODULE
     then
       (
@@ -87,7 +86,6 @@ show_modules()	{
 has_modules()	{ 
   for  MODULE in `list_modules "$1"`;  do
     if  !  module_installed  $MODULE  &&
-        !  module_held       $MODULE  &&
         !  module_exiled     $MODULE
     then
       return 0
@@ -237,7 +235,7 @@ make_checklist()  {
     (
     run_details $MODULE
 
-    if module_installed $MODULE || module_held $MODULE; then
+    if module_installed $MODULE; then
       STATUS="on"
     else
       STATUS="off"




More information about the Lunar-commits mailing list