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

Auke Kok sofar at lunar-linux.org
Tue Dec 7 12:12:44 UTC 2004


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

Modified Files:
	download.lunar 
Log Message:
Implemented Moe's download idea: separate lget processes and logs for each downloaded file. The dl manager passes the PID on later and before a module is compiled ONLY that relevant download info is displayed.


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- download.lunar	26 Nov 2004 08:20:39 -0000	1.45
+++ download.lunar	7 Dec 2004 12:12:42 -0000	1.46
@@ -458,17 +458,18 @@
 }
 
 
-show_downloading() {
-  debug_msg "show_downloading ($@)"
-  if [ -e "$TEMP_DOWNLOADLOG" ] ; then
-    verbose_msg "====== download progess:"
-    while lget_locked $MODULE ; do
-      sleep 1
-    done
-    cat $TEMP_DOWNLOADLOG
-    > $TEMP_DOWNLOADLOG
-    verbose_msg "====== end download progress"
-  fi
+show_downloading()
+{
+    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 --follow=name --pid=$DOWNLOAD_PID $DOWNLOAD_LOG
+        sleep 1
+    fi
+    rm $DOWNLOAD_LOG
 }
 
 



More information about the Lunar-commits mailing list