[Lunar-commits] <lunar> Backmerge from theedge: - lvu sync - add k-de mirror - fix for make wrapper breaking other wrappers - fix download urls with // - small spelling fixes - fix unpacking of -tar.bz2's (no dot before extension)

Auke Kok sofar at lunar-linux.org
Mon Jul 2 04:43:06 CEST 2012


commit caed353e348af4cdfe5acd16b26a8642113567e2
Author: Auke Kok <sofar at lunar-linux.org>
Date:   Mon Jul 25 09:53:09 2005 +0000

    Backmerge from theedge:
    - lvu sync
    - add k-de mirror
    - fix for make wrapper breaking other wrappers
    - fix download urls with //
    - small spelling fixes
    - fix unpacking of -tar.bz2's (no dot before extension)
---
 bin/lvu                                     |   36 +++++++++++++++++++++++++--
 etc/lunar/mirrors/LRESORT                   |    1 +
 var/lib/lunar/compilers/make                |    4 +--
 var/lib/lunar/functions/download.lunar      |    6 +++--
 var/lib/lunar/functions/modules.lunar       |    8 +++---
 var/lib/lunar/functions/plugins.lunar       |    2 +-
 var/lib/lunar/menu/download.menu            |    2 +-
 var/lib/lunar/menu/optimize.menu            |    2 +-
 var/lib/lunar/plugins/unpack-generic.plugin |    4 +--
 9 files changed, 50 insertions(+), 15 deletions(-)

diff --git a/bin/lvu b/bin/lvu
index 799d86d..93e4004 100755
--- a/bin/lvu
+++ b/bin/lvu
@@ -80,8 +80,9 @@ maintainer  module         display maintainer for a module
 version     module         display version of module in moonbase
 
 edit        module         copy a module to zlocal for editing
-submit      module         try to submit a module to the lunar ML
-unedit      module         delete your zlocal copy of a module
+diff        module         view changes on edited module
+submit      module         attempt to submit a module to the lunar ML
+unedit      module         delete zlocal copy of a module
 
 sum         [module]       display checksums
 md5sum      [module]       display md5sums
@@ -727,6 +728,33 @@ show_info() {
 }
 
 
+diff_module() {
+  if [ "$ZLOCAL_OVERRIDES" != "on" ]; then
+    message "can't diff modules without ZLOCAL_OVERRIDES=on"
+	exit 1
+  fi
+  if [ -z "$1" ]; then
+    message "diff requires a single module name"
+	exit 1
+  fi
+  if ! run_details "$1" ; then
+      message "diff requires an existing module"
+      exit 1
+  else
+    if echo $SECTION | grep -q '^zlocal' ; then
+	  ZLOCAL_OVERRIDES=off NZSECTION=$(find_section $1)
+	  if echo $NZSECTION | grep -q '^zlocal' ; then
+	    unset SECTION
+	  fi
+	else
+	  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"
+  fi
+}
+
 submit_module() {
   # this code tries to send the module back to the mailinglist
   # as good as it gets
@@ -1246,6 +1274,10 @@ main()  {
      fi
      ;;
 
+   diff)
+     diff_module $2
+	 ;;
+
    submit)
      submit_module $2
      ;;
diff --git a/etc/lunar/mirrors/LRESORT b/etc/lunar/mirrors/LRESORT
index ce72eb5..4e9f57d 100644
--- a/etc/lunar/mirrors/LRESORT
+++ b/etc/lunar/mirrors/LRESORT
@@ -2,5 +2,6 @@ Custom      			Custom
 Mirror site - TX-US		http://tx-us.lunar-linux.org/lunar/cache/
 Mirror site - SE		http://gbg-se.lunar-linux.org/lunar/cache/
 Mirror site - DE		http://de.lunar-linux.org/lunar/cache/
+Mirror site - DE		http://k-de.lunar-linux.org/lunar/cache/
 Master site - NL		http://lunar-linux.org/lunar/cache/
 Mirror site - NL		http://nl.lunar-linux.org/lunar/cache/
diff --git a/var/lib/lunar/compilers/make b/var/lib/lunar/compilers/make
index 5349e60..d87629b 100755
--- a/var/lib/lunar/compilers/make
+++ b/var/lib/lunar/compilers/make
@@ -1,10 +1,8 @@
 #!/bin/bash
 
-export PATH=${PATH/\/var\/lib\/lunar\/compilers:/}
-
 if [ -n "$LUNAR_DEBUG" ] ; then
   echo "++ $MAKE_EXT make ${MAKES:+-j$MAKES} \"$@\"" >&2
 fi
 
-$MAKE_EXT make ${MAKES:+-j$MAKES} "$@"
+$MAKE_EXT /usr/bin/make ${MAKES:+-j$MAKES} "$@"
 
diff --git a/var/lib/lunar/functions/download.lunar b/var/lib/lunar/functions/download.lunar
index 1218c2b..d174836 100644
--- a/var/lib/lunar/functions/download.lunar
+++ b/var/lib/lunar/functions/download.lunar
@@ -35,10 +35,12 @@ lget_unlock() {
 
 download_url() {
     local RETVAL
+    local CLEAN_URL
 	debug_msg "download_url($@)"
-	verbose_msg "trying to download \"$URL\""
+	CLEAN_URL=`echo $1 | sed "s:\([^:]/\)/*:\1:g"`
+	verbose_msg "trying to download \"$CLEAN_URL\""
 	connect &&
-	plugin_call SOURCE_DOWNLOAD $1 $2 $3
+	plugin_call SOURCE_DOWNLOAD $CLEAN_URL $2 $3
 	RETVAL=$?
 	if [ $RETVAL == 2 ]; then
 		message "${PROBLEM_COLOR}Warning:${QUERY_COLOR} I don't know how to download \"$1\"${DEFAULT_COLOR}"
diff --git a/var/lib/lunar/functions/modules.lunar b/var/lib/lunar/functions/modules.lunar
index bdc32d3..414bbde 100644
--- a/var/lib/lunar/functions/modules.lunar
+++ b/var/lib/lunar/functions/modules.lunar
@@ -157,9 +157,11 @@ find_section() {
 
   ZLOCAL_OVERRIDES=${ZLOCAL_OVERRIDES:=off}
   if [ "$ZLOCAL_OVERRIDES" == "on" ] ; then
-    if [ -d "$MOONBASE/zlocal/$1" ] ; then
-      echo "zlocal"
-      return 0
+    if SECTION=$(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||" -e "s|/$1$||" ) ; then
+	  if [ -n "$SECTION" ]; then
+	    echo $SECTION
+        return 0
+	  fi
     fi
   fi
 
diff --git a/var/lib/lunar/functions/plugins.lunar b/var/lib/lunar/functions/plugins.lunar
index 95ffcfd..3500914 100644
--- a/var/lib/lunar/functions/plugins.lunar
+++ b/var/lib/lunar/functions/plugins.lunar
@@ -25,7 +25,7 @@ plugin_register() {
 	# Defined plugin types:
 	#  1 - SOURCE_DOWNLOAD         download some source code
 	#  2 - SOURCE_NEEDREFRESH      source exists but needs refresh
-    #  3 - SOURCE_VERIFY           perform intergity verification on a file
+	#  3 - SOURCE_VERIFY           perform intergity verification on a file
 	#  4 - SOURCE_UNPACK           unpack a certain file to $(PWD)
 	#  5 - MODULE_CHECK            integrity checking on installed modules
 	#  6 - KERNEL_UPDATEBOOTLOADER automate bootloader maintenance
diff --git a/var/lib/lunar/menu/download.menu b/var/lib/lunar/menu/download.menu
index da1f857..744ef6e 100644
--- a/var/lib/lunar/menu/download.menu
+++ b/var/lib/lunar/menu/download.menu
@@ -35,7 +35,7 @@ Example: http://192.168.1.1:8080/"
 Example: http://192.168.1.1:8080/"
 
      NO_PROMPT="Please enter all domains/ip addresses \
-(comma-seperated) proxy should NOT be used for: \
+(comma-separated) proxy should NOT be used for: \
 Example: .mit.edu,mysite.com"
 
     HPROXY=`inputbox "$HTTP_PROMPT" "$http_proxy"` &&
diff --git a/var/lib/lunar/menu/optimize.menu b/var/lib/lunar/menu/optimize.menu
index a085a60..b8a2177 100644
--- a/var/lib/lunar/menu/optimize.menu
+++ b/var/lib/lunar/menu/optimize.menu
@@ -181,7 +181,7 @@ optimizations_help() {
      FLAGS=${FLAGS/fpu/387}
      FLAGS=${FLAGS/387 sse/387 and sse (both)}
 
-     MENU="Select available Floating Point Math compile extenstions. The kernel reports that this sytem has: $FLAGS"
+     MENU="Select available Floating Point Math compile extensions. The kernel reports that this system has: $FLAGS"
      None_HELP="Do not enable any extra features."
      x387_HELP="Classic 387 or higher Floating Point Co-Processor"
      SSE_HELP="Streaming SIMD (Single Instruction, Multiple Data) Extensions"
diff --git a/var/lib/lunar/plugins/unpack-generic.plugin b/var/lib/lunar/plugins/unpack-generic.plugin
index d3b3543..b3d55ab 100644
--- a/var/lib/lunar/plugins/unpack-generic.plugin
+++ b/var/lib/lunar/plugins/unpack-generic.plugin
@@ -13,11 +13,11 @@
 
 plugin_unpack_generic() {
 	case $1 in
-		*.tar.bz2|*.tbz2)
+		*tar.bz2|*tbz2)
 			debug_msg "Unpacking tar.bz2 file \"$1\""
 			tar jxf $1 --no-same-owner --no-same-permissions || return 1
 			;;
-		*.tar.gz|*.tgz|*.tar.Z)
+		*tar.gz|*tgz|*tar.Z)
 			debug_msg "Unpacking tar.gz file \"$1\""
 			tar zxf $1 --no-same-owner --no-same-permissions || return 1
 			;;


More information about the Lunar-commits mailing list