[Lunar-commits] r20238 - in lunar/branches/stable: bin sbin var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Sat May 27 16:37:20 UTC 2006


Author: sofar
Date: 2006-05-27 16:37:19 +0000 (Sat, 27 May 2006)
New Revision: 20238

Modified:
   lunar/branches/stable/bin/lvu
   lunar/branches/stable/sbin/lrm
   lunar/branches/stable/var/lib/lunar/functions/download.lunar
   lunar/branches/stable/var/lib/lunar/functions/modules.lunar
   lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
Log:
Quick resync between theedge->lunar. license fix, zlocal module locator fix, lrm order fix, download url cosmetic fix. lvu diff fix.


Modified: lunar/branches/stable/bin/lvu
===================================================================
--- lunar/branches/stable/bin/lvu	2006-05-27 16:34:02 UTC (rev 20237)
+++ lunar/branches/stable/bin/lvu	2006-05-27 16:37:19 UTC (rev 20238)
@@ -479,12 +479,11 @@
     }
     
     debug_msg "run_depends ($@)"
-    SECTION=$(grep "^$1:" $MODULE_INDEX | cut -d: -f2)
+    SECTION=$(find_section $1)
+    SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
     CPU_ARCH=$(uname -m | sed 's/i[456]86/i386/')
-    if [ -f $MOONBASE/$SECTION/$1/DEPENDS.$CPU_ARCH ] ; then
-      . $MOONBASE/$SECTION/$1/DEPENDS.$CPU_ARCH
-    elif [ -f $MOONBASE/$SECTION/$1/DEPENDS ] ; then
-      . $MOONBASE/$SECTION/$1/DEPENDS
+    if has_module_file $1 DEPENDS ; then
+      run_module_file $1 DEPENDS
     fi
   }
  
@@ -762,8 +761,8 @@
 	  message "no local copy of \"$MODULE\" exists"
 	  exit 1
     fi
-	ZSECTION=$(echo $SECTION | sed 's/zlocal/\//g')
-    diff -Nurb $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | sed "s|^\([+-][+-][+-] \)$MOONBASE/[^/]*/|\1|g" | grep -v "^diff " | sed "s|$ZSECTION\/||g"
+	ZSECTION=$(echo "$SECTION/" | sed 's/^zlocal\///g;s/\/$//')
+    diff -Nurb $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | grep -v "^diff " | sed "s:$MOONBASE/$NZSECTION/::g;s:$MOONBASE/zlocal/$ZSECTION/::g"
   fi
 }
 

Modified: lunar/branches/stable/sbin/lrm
===================================================================
--- lunar/branches/stable/sbin/lrm	2006-05-27 16:34:02 UTC (rev 20237)
+++ lunar/branches/stable/sbin/lrm	2006-05-27 16:37:19 UTC (rev 20238)
@@ -182,6 +182,9 @@
     verbose_msg "Skipping removal of files completely (REAP=$REAP)"
   fi
 
+  # administration duty time:
+  remove_module $MODULE
+
   # time-out 2: POST_REMOVE
   if [ "$UPGRADE" != "on" ] ; then
     plugin_call BUILD_POST_REMOVE $MODULE
@@ -199,9 +202,6 @@
     fi
   fi
 
-  # administration duty time:
-  remove_module $MODULE
-
   message  "${LRM_COLOR}Removed${EXTEMP} module:"  \
            "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
   activity_log  "lrm"  "$MODULE" "$VERSION"  "success"

Modified: lunar/branches/stable/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-05-27 16:34:02 UTC (rev 20237)
+++ lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-05-27 16:37:19 UTC (rev 20238)
@@ -34,7 +34,7 @@
 
 
 download_url() {
-    local RETVAL
+	local RETVAL
 	debug_msg "download_url($@)"
 	verbose_msg "trying to download \"$1/$2\""
 	connect &&
@@ -92,7 +92,7 @@
 			if [ -n "$1" ]; then
 				if ! echo " $ALL_URLS " | grep -q " $1 "; then
 					# make sure the URL has ONE "/" at the end
-					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:[/][/]$:/:g")"
+					ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:[/]*$:/:g")"
 				fi
 			fi
 		}
@@ -129,7 +129,7 @@
 					fi
 				done
 				add_url $LRESORT_URL
-		    fi
+			fi
 
 			for URL in $ALL_URLS; do
 				# and download

Modified: lunar/branches/stable/var/lib/lunar/functions/modules.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-05-27 16:34:02 UTC (rev 20237)
+++ lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-05-27 16:37:19 UTC (rev 20238)
@@ -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
@@ -232,7 +227,10 @@
     SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
     MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MODULE}
     MODULE_PREFIX=${MODULE_PREFIX:-$DEFAULT_PREFIX}
-
+    if [ "$MODULE_PREFIX" != "$DEFAULT_PREFIX" ]; then
+      export PKG_CONFIG_PATH=$MODULE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
+      export PATH=$PATH:$MODULE_PREFIX/bin
+    fi
     return 0
   fi
 }
@@ -287,7 +285,7 @@
   #
   # valid licenses currently are:
   # osi == gpl gpl2 lgpl gfdl bsd mpl cc apache artistic qpl
-  
+
   debug_msg "module_license_accepted ($@)"
 
   local L LICENSE IS_OSI
@@ -297,7 +295,7 @@
     debug_msg "assuming LICENSE=\"osi\""
     LICENSE="osi"
   fi
-  
+
   # check for osi license
   case $LICENSE in
     gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl|osi)
@@ -312,7 +310,7 @@
   # * accept "all" will accept anything
   if [[ -n "$ACCEPTED_LICENSES" ]]; then
     for L in $ACCEPTED_LICENSES; do
-      if [[ "$L" == "osi" ]] && "$IS_OSI" == "yes" ]] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
+      if [[ "$L" == "osi" ]] && [[ "$IS_OSI" == "yes" ]] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
         # explicitly accepted license!
 	debug_msg "module_license_accepted: \"$LICENSE\" is explicitly accepted"
         return 0

Modified: lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-05-27 16:34:02 UTC (rev 20237)
+++ lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-05-27 16:37:19 UTC (rev 20238)
@@ -41,7 +41,7 @@
 			$DIALOG --msgbox "There are no configurable compontents. Please update your moonbase!" 6 60
 			return
 		fi
-		PLUGIN=`$DIALOG --cancel-label "Close" --menu "Select a component for which to configure optimizations" 0 0 0 $(plugin_call OPTIMIZE_MENU)`
+		PLUGIN=`$DIALOG --cancel-label "Close" --default-item "$PLUGIN" --menu "Select a component for which to configure optimizations" 0 0 0 $(plugin_call OPTIMIZE_MENU)`
 		if [ $? != 0 ]; then
 			return
 		fi



More information about the Lunar-commits mailing list