[Lunar-commits] CVS: theedge/var/lib/lunar/functions depends.lunar,
1.25, 1.26
Steven Michaelske
hardkrash at lunar-linux.org
Wed Jan 21 16:32:55 GMT 2004
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv8636
Modified Files:
depends.lunar
Log Message:
making algorithim improvments proposed by Erik Søe Sørensen
thankyou sir
Index: depends.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/depends.lunar,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- depends.lunar 9 Jan 2004 15:38:18 -0000 1.25
+++ depends.lunar 21 Jan 2004 16:32:53 -0000 1.26
@@ -70,13 +70,20 @@
sort_by_dependency() {
debug_msg "sort_by_dependency ($@)"
+ included=""
+
recurse() {
for MOD in $* ; do
- LIST=$(grep ^$MOD: $DEPENDS_STATUS | grep ":on:" | cut -d: -f2)
- for DEP in $LIST ; do
- echo $MOD $DEP
- done
- recurse $LIST
+ if echo "$included" | grep -qFx "$MOD" ; then
+ debug_msg "Cutoff: $MOD"
+ else
+ LIST=$(grep ^$MOD: $DEPENDS_STATUS | grep ":on:" | cut -d: -f2)
+ for DEP in $LIST ; do
+ echo $MOD $DEP
+ done
+ included=$included$'\n'$MOD
+ recurse $LIST
+ fi
done
}
More information about the Lunar-commits
mailing list