[prev in list] [next in list] [prev in thread] [next in thread] 

List:       annvix-cvs
Subject:    [cvs] CVS commit in tools/srv on 2005/09/25 18:45:24
From:       cvsrep () annvix ! org
Date:       2005-09-25 18:45:24
Message-ID: E1EJbV6-0004Pl-S7 () build ! annvix ! org
[Download RAW message or body]

Module name:   tools/srv
Changes by:    spt
Date:          2005/09/25 18:45:24

Commit log:
Fixed a problem with getting dependency information.  It would push a
duplicate dependency that was already on the TODO list to the NEXT_TODO
list.  It is possible that something would be added to the COMPLETED list
but still have a duplicate on the NEXT_TODO.  This would cause it to think
that no progress was made ergo a dependency loop.

Index: srv
===================================================================
RCS file: /work/annvix/cvsroot/tools/srv/srv,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- srv	22 Sep 2005 16:37:01 -0000	1.66
+++ srv	25 Sep 2005 18:45:24 -0000	1.67
@@ -4,7 +4,7 @@
 ######################################################################
 #
 #   srv - controls the handling of runsv-controlled services
-#   $Id: srv,v 1.66 2005/09/22 16:37:01 spt Exp $
+#   $Id: srv,v 1.67 2005/09/25 18:45:24 spt Exp $
 #
 #   Copyright (c) 2004 Vincent Danen <vdanen@annvix.org>
 #       and Sean P. Thomas <spt@annvix.org>
@@ -727,16 +727,21 @@
 
 #   CHECK TO MAKE SURE THAT DEPENDENCY ISN'T ALREADY FULFILLED
 
-		echo " $COMPLETED " | grep " ${depends} " >/dev/null 2>&1
+                echo " $COMPLETED " | grep " ${depends} " >/dev/null 2>&1
 
                 if [ $? -ne 0 ] ; then
 
+                    echo " $TODO " | grep " ${depends} " >/dev/null 2>&1
+
+                    if [ $? -ne 0 ] ; then
+
 #   ADD DEPENDENCY TO THE TODO LIST
 
-                    NEXT_TODO="${depends} $NEXT_TODO"
-                    echo "DEBUG: Next Todo + ${depends}=$NEXT_TODO" >&2
+                        NEXT_TODO="${depends} $NEXT_TODO"
+                        echo "DEBUG: Next Todo + ${depends}=$NEXT_TODO" >&2
 
-                    non_fulfilled_dep="1"
+                        non_fulfilled_dep="1"
+                    fi
                 fi
             done
 


_______________________________________________
cvs mailing list
cvs@annvix.org
http://annvix.org/mailman/listinfo/cvs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic