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

Auke Kok sofar at lunar-linux.org
Mon Apr 24 04:20:11 UTC 2006


Author: sofar
Date: 2006-04-24 04:20:10 +0000 (Mon, 24 Apr 2006)
New Revision: 19836

Modified:
   lunar/trunk/var/lib/lunar/functions/modules.lunar
Log:
Fix for #86 - do not store zlocal modules in the module.index file. this will cause zlocal modules not to show up in tabcompletion but closes some nuisances with double returns from find_section($MODULE).


Modified: lunar/trunk/var/lib/lunar/functions/modules.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/modules.lunar	2006-04-24 02:13:29 UTC (rev 19835)
+++ lunar/trunk/var/lib/lunar/functions/modules.lunar	2006-04-24 04:20:10 UTC (rev 19836)
@@ -107,19 +107,14 @@
     grep "/DETAILS$" $INSTALL_LOGS/moonbase-$(installed_version moonbase) | \
         sed -e 's:/var/lib/lunar/moonbase/::' -e 's:/DETAILS::g' \
         -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
-    # we search zlocal locally to make sure they get found:
-    find $MOONBASE/zlocal -type f -name DETAILS | \
-        sed -e "s:$MOONBASE/::g" -e 's:/DETAILS::g' \
-        -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' >> $TMP_INDEX
   else
     # this *really* is the fastest way to do it, no guarantees, we
     # do have to make sure MOONBASE is coherent and tidy though
     debug_msg "Regenerating \$MODULE_INDEX manually..."
-    find $MOONBASE -type f -name DETAILS | \
-        sed -e "s:$MOONBASE/::g" -e 's:/DETAILS::g' \
-        -e 's/\/\([^/]*\)$/:\1/' -e 's/\(.*\):\(.*\)/\2:\1/g' > $TMP_INDEX
+    find $MOONBASE -type f -name DETAILS ! -regex "$MOONBASE/zlocal/.*" \
+        -printf "%h\n" | sed "s:$MOONBASE/::g;s:^\(.*\)/\(.*\)$:\2\:\1:g" > $TMP_INDEX
   fi
-  
+
   # this should be safe enough:
   lock_file $MODULE_INDEX &&
   install -m644 $TMP_INDEX $MODULE_INDEX



More information about the Lunar-commits mailing list