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

Auke Kok sofar at lunar-linux.org
Thu Oct 13 20:18:19 UTC 2005


Author: sofar
Date: 2005-10-13 20:18:15 +0000 (Thu, 13 Oct 2005)
New Revision: 16932

Modified:
   lunar/trunk/var/lib/lunar/functions/depends.lunar
Log:
Somehow sort_by_dependency was a dud, this code actually speeds it up a bit and gives correct output for me where it was previously not doing that.


Modified: lunar/trunk/var/lib/lunar/functions/depends.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/depends.lunar	2005-10-13 19:31:38 UTC (rev 16931)
+++ lunar/trunk/var/lib/lunar/functions/depends.lunar	2005-10-13 20:18:15 UTC (rev 16932)
@@ -71,9 +71,7 @@
 
   # tsort the existing dep relations in all of moonbase
   TMP_TSRT=$(temp_create "dependency.sort")
-  for LINE in $(cat $DEPENDS_CACHE); do
-    A=$(echo $LINE | cut -d: -f1)
-	B=$(echo $LINE | cut -d: -f2)
+  cat $DEPENDS_CACHE | cut -d: -f1,2 --output-delimiter=" " | while read A B ; do
     B=$(MODULE=$A NEVER_ASK=1 DEPS_ONLY= unalias $B)
     echo "$A $B" >> $TMP_TSRT
   done



More information about the Lunar-commits mailing list