[Lunar-commits] r14681 - lunar/trunk/var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Mon May 9 14:50:51 UTC 2005


Author: sofar
Date: 2005-05-09 14:50:50 +0000 (Mon, 09 May 2005)
New Revision: 14681

Modified:
   lunar/trunk/var/lib/lunar/functions/check.lunar
   lunar/trunk/var/lib/lunar/functions/depends.lunar
Log:
Hopefully this will fix the 'alias' bug on 'lunar fix' including 'lunar update' etc... The satisfy_depends code now has explicit NEVER_ASK and internally discards an alias if it should be bassed by find_depends. I still don't get who the unalias code doesn't find the proper alias for this case, but it works. Also added a slight hint more information (-v level).


Modified: lunar/trunk/var/lib/lunar/functions/check.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/check.lunar	2005-05-09 11:49:36 UTC (rev 14680)
+++ lunar/trunk/var/lib/lunar/functions/check.lunar	2005-05-09 14:50:50 UTC (rev 14681)
@@ -28,7 +28,7 @@
   # we declare these local to override the systems default ones:
   optional_depends()  {
     debug_msg "  optional_depends ($@)"
-    DEP=$(unalias $1)
+    DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
     if module_exiled $DEP ; then
       echo "$MODULE:$DEP:off:optional:$2:$3"
     else
@@ -42,7 +42,7 @@
                                                                                 
   depends()  {
     debug_msg "  depends ($@)"
-    DEP=$(unalias $1)
+    DEP=$(NEVER_ASK=1 DEPS_ONLY= unalias $1)
     if ! module_installed $DEP && ! module_held $DEP ; then
       if ! is_depends $DEP && module_exiled $DEP ; then
         return  1
@@ -59,7 +59,7 @@
    (
     if run_details $1 &> /dev/null ; then
       if [ -s "$SCRIPT_DIRECTORY/DEPENDS" ] ; then
-      run_module_file $MODULE DEPENDS
+      run_module_file $MODULE DEPENDS | grep -v '%'
       fi
     fi
    ) 
@@ -73,9 +73,9 @@
   lock_file $DEPENDS_STATUS_BACKUP                              &&
   lock_file $DEPENDS_STATUS                                     &&
   grep -v "^$MODULE:" $DEPENDS_STATUS_BACKUP > $DEPENDS_STATUS  &&
-  run_depends $MODULE >> $DEPENDS_STATUS                        &&
-  cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP                  &&
-  unlock_file $DEPENDS_STATUS                                   &&
+  run_depends $MODULE >> $DEPENDS_STATUS
+  cat $DEPENDS_STATUS > $DEPENDS_STATUS_BACKUP
+  unlock_file $DEPENDS_STATUS
   unlock_file $DEPENDS_STATUS_BACKUP
 }
 
@@ -121,13 +121,16 @@
           if [ -n "$NOFIX" ] ; then
             continue
           fi
-          satisfy_depends      &&
-          FIX= satisfy_depends &&
+          NEVER_ASK=1 DEPS_ONLY= satisfy_depends      &&
+          NEVER_ASK=1 DEPS_ONLY= FIX= satisfy_depends &&
 
           if ! run_checks $MODULE ; then
+		    verbose_msg "Attempting to recompile \"$MODULE\""
             if ! FIX= lin --compile $MODULE ; then
+		      verbose_msg "Attempt to recompile \"$MODULE\" FAILED"
               continue
             elif ! run_checks $MODULE ; then
+		      verbose_msg "Attempt to recompile \"$MODULE\" succeeded but \"$MODULE\" still is broken!"
 			  continue
             fi
           fi

Modified: lunar/trunk/var/lib/lunar/functions/depends.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/depends.lunar	2005-05-09 11:49:36 UTC (rev 14680)
+++ lunar/trunk/var/lib/lunar/functions/depends.lunar	2005-05-09 14:50:50 UTC (rev 14681)
@@ -255,7 +255,7 @@
   grep "^$MODULE:" $DEPENDS_STATUS > $TMP_FILE
 
   # first recursively check if all required dependencies are installed
-  for DEP_MODULE in $(find_depends $MODULE) ; do
+  for DEP_MODULE in $(find_depends $MODULE | grep -v '%') ; do
     if [ $DEP_MODULE != $MODULE ]; then
       if ! module_installed $DEP_MODULE ; then
         if ! SINGLE_MODULE=1 lin $SILENT $COMPILE $DEP_MODULE ; then



More information about the Lunar-commits mailing list