CVS: theedge/var/lib/lunar/functions check.lunar,1.9,1.10

elaine at lunar-linux.org elaine at lunar-linux.org
Sat Dec 13 20:59:01 GMT 2003


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv28924

Modified Files:
	check.lunar 
Log Message:
Fixed another /versioning bug, we still have dup lines in the fixdepends-
created depends files


Index: check.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/check.lunar,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- check.lunar	1 Oct 2003 16:28:46 -0000	1.9
+++ check.lunar	13 Dec 2003 20:58:59 -0000	1.10
@@ -258,7 +258,7 @@
                                                                                 
   # here starts the real work:
   MODULE=$1
- mod_v_safe_edit $MODULE 
+  mod_v_safe_edit $MODULE 
                                                                                 
   # base vars needed to execute DEPENDS
   SECTION=$(find_section $MODULE)
@@ -275,20 +275,20 @@
   touch $DEPENDS_STATUS_BACKUP
                                                                                 
   # fetch old depend data:
-  grep "^$MODULE:" $OLD_DEPENDS_STATUS | sort | uniq > $TMP/depends.old.$MODULE
+  grep "^$MODULE:" $OLD_DEPENDS_STATUS | sort | uniq > $TMP/depends.old.$MOD_V_SNAME
                                                                                 
   # fetch new depend data:
   run_depends
-  grep "^$MODULE:" $DEPENDS_STATUS | sort | uniq > $TMP/depends.new.$MODULE
+  grep "^$MODULE:" $DEPENDS_STATUS | sort | uniq > $TMP/depends.new.$MOD_V_SNAME
                                                                                 
-  if $(! diff -q $TMP/depends.old.$MODULE $TMP/depends.new.$MODULE &> /dev/null
+  if $(! diff -q $TMP/depends.old.$MODULE $TMP/depends.new.$MOD_V_SNAME &> /dev/null
 ) ; then
     echo -e "${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} has changed depends:${DEFAULT_COLOR}"
     CHANGED_MODULES="$CHANGED_MODULES $MODULE"
-    LIST=$(cat $TMP/depends.old.$MODULE $TMP/depends.new.$MODULE | cut -d: -f2 | sort | uniq )
+    LIST=$(cat $TMP/depends.old.$MOD_V_SNAME $TMP/depends.new.$MOD_V_SNAME | cut -d: -f2 | sort | uniq )
     for DEP in $LIST; do
-      OLDDEP=$(grep ":$DEP:" $TMP/depends.old.$MODULE)
-      NEWDEP=$(grep ":$DEP:" $TMP/depends.new.$MODULE)
+      OLDDEP=$(grep ":$DEP:" $TMP/depends.old.$MOD_V_SNAME)
+      NEWDEP=$(grep ":$DEP:" $TMP/depends.new.$MOD_V_SNAME)
       if [ "$OLDDEP" != "$NEWDEP" ] ; then
                                                                                 
         # diff style output for debugging:
@@ -367,10 +367,10 @@
 # fix_depends : single pass to fix depends database
 fix_depends () {
   debug_msg "fix_depends  ($@)"
-                                                                                
+
   TMP=/tmp/lunar.fix
   [ -d $TMP ] || mkdir -p $TMP
-                                                                                
+
   CHANGED_MODULES=
   # we NEED this
   if [ -f "$INSTALL_QUEUE" ] ; then
@@ -383,21 +383,22 @@
   else
     rework_list $(cat $MODULE_STATUS | cut -d: -f1 | sort )
   fi
-                                                                                
+
   if [ -n "$CHANGED_MODULES" ] ; then
-                                                                                
-    for MODULE in $CHANGED_MODULES ; do
-      if [ ! -e "$TMP/depends.new.$MODULE" ] ; then
-        rework_module $MODULE
+
+    for REWORK_MODULE in $CHANGED_MODULES ; do
+      mod_v_safe_edit $REWORK_MODULE
+      if [ ! -e "$TMP/depends.new.$MOD_V_SNAME" ] ; then
+        rework_module $REWORK_MODULE
       fi
     done
-                                                                                
+
     # this ensures the bastard doesn't recheck it:
     if [ -z "$NOFIX" ] ; then
       mv $DEPENDS_STATUS $TMP/depends
       cp $TMP/depends $TMP/depends.filter
-      for MODULE in $CHANGED_MODULES ; do
-        grep -v "^$MODULE:" $TMP/depends.filter > $TMP/depends.filter~
+      for CH_MODULE in $CHANGED_MODULES ; do
+        grep -v "^$CH_MODULE:" $TMP/depends.filter > $TMP/depends.filter~
         mv $TMP/depends.filter~ $TMP/depends.filter
       done
       mv $TMP/depends.filter $DEPENDS_STATUS
@@ -405,11 +406,11 @@
       cp $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
     fi
                                                                                 
-    for MODULE in $CHANGED_MODULES ; do
+    for CH_MODULE in $CHANGED_MODULES ; do
       # special case: when called with --fixdepends, skip recompile!
       cp $TMP/depends $TMP/depends.filter
-      for MODULE in $CHANGED_MODULES ; do
-        grep -v "^$MODULE:" $TMP/depends.filter > $TMP/depends.filter~
+      for CH_MODULE in $CHANGED_MODULES ; do
+        grep -v "^$CH_MODULE:" $TMP/depends.filter > $TMP/depends.filter~
         mv $TMP/depends.filter~ $TMP/depends.filter
       done
       mv $TMP/depends.filter $DEPENDS_STATUS




More information about the Lunar-commits mailing list