[Lunar-commits] CVS: theedge/var/lib/lunar/functions download.lunar, 1.48, 1.49

Auke Kok sofar at lunar-linux.org
Fri Dec 10 10:56:32 UTC 2004


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions

Modified Files:
	download.lunar 
Log Message:
Bugfix for the theedge dl problems: when we get to this code and a post-install triggered a recompile the _PID is never stored so it's empty... we can gracefully exit and ignore this usually. I added a fallback function when the module is locked so at least st is going on. I hope this calls all exceptions.


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- download.lunar	10 Dec 2004 10:46:33 -0000	1.48
+++ download.lunar	10 Dec 2004 10:56:30 -0000	1.49
@@ -462,14 +462,22 @@
 {
     debug_msg "show_downloading ($@)"
     DOWNLOAD_PID=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f2)
-    DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
-    if [ ! -d /proc/$DOWNLOAD_PID -a -f $DOWNLOAD_LOG ]; then
-        cat $DOWNLOAD_LOG
-    else
-        tail -s 0.0 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
-        sleep 1
+    if [ -n "$DOWNLOAD_PID" ]; then
+        DOWNLOAD_LOG=$(grep ^$MODULE: $TEMP_DOWNLOAD_PIDS | cut -d: -f3)
+        if [ ! -d "/proc/$DOWNLOAD_PID" -a -f "$DOWNLOAD_LOG" ]; then
+            cat $DOWNLOAD_LOG
+        else
+            tail -s 0.0 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
+            sleep 1
+        fi
+        rm $DOWNLOAD_LOG
+    elif lget_locked $MODULE; then
+        message "${MESSAGE_COLOR}Please wait while downloading of ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} progresses${DEFAULT_COLOR}"
+        while lget_locked $MODULE; do
+	    echo -n "."
+	    sleep 5
+	done
     fi
-    rm $DOWNLOAD_LOG
 }
 
 



More information about the Lunar-commits mailing list