[Lunar-commits] r23520 - in lunar/branches/stable: bin sbin usr/share/man/man8 var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Tue Mar 6 20:30:33 CET 2007
Author: sofar
Date: 2007-03-06 20:30:33 +0100 (Tue, 06 Mar 2007)
New Revision: 23520
Modified:
lunar/branches/stable/bin/lvu
lunar/branches/stable/sbin/lget
lunar/branches/stable/usr/share/man/man8/lget.8
lunar/branches/stable/var/lib/lunar/functions/aliases.lunar
lunar/branches/stable/var/lib/lunar/functions/messages.lunar
Log:
full sync:
API change - mquery extended syntax
alias code speedups and more verbose printout of choice availability
lget -w + man page
lvu diff format update
Modified: lunar/branches/stable/bin/lvu
===================================================================
--- lunar/branches/stable/bin/lvu 2007-03-06 19:20:31 UTC (rev 23519)
+++ lunar/branches/stable/bin/lvu 2007-03-06 19:30:33 UTC (rev 23520)
@@ -763,7 +763,9 @@
exit 1
fi
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"
+ echo diff a/$NZSECTION/$MODULE b/$NZSECTION/$MODULE
+ diff -Nur $MOONBASE/$NZSECTION/$MODULE $MOONBASE/zlocal/$ZSECTION/$MODULE --exclude ".svn" --exclude "CVS" | \
+ grep -v ^diff | sed "s:$MOONBASE/$NZSECTION/:a/$NZSECTION/:g;s:$MOONBASE/zlocal/$ZSECTION/:b/$NZSECTION/:g"
fi
}
Modified: lunar/branches/stable/sbin/lget
===================================================================
--- lunar/branches/stable/sbin/lget 2007-03-06 19:20:31 UTC (rev 23519)
+++ lunar/branches/stable/sbin/lget 2007-03-06 19:30:33 UTC (rev 23520)
@@ -45,6 +45,8 @@
-u | --url URL Specify an alternate download URL
-v | --verbose Increases the level of message output
-V | --Version Select specific Version of module to install
+ -w | --want version Try to download a different version that is
+ not in moonbase
EOF
exit 1
@@ -84,7 +86,7 @@
. /etc/lunar/config
-GETOPT_ARGS=$(getopt -q -n lget -o "adf:hu:vV:" -l "all,debug,from:,help,url:,verbose,Version:" -- "$@")
+GETOPT_ARGS=$(getopt -q -n lget -o "adf:hu:vV:w:" -l "all,debug,from:,help,url:,verbose,Version:want:" -- "$@")
if [ -z "$?" ] ; then
help | view_file
@@ -103,6 +105,7 @@
-h|--help ) help ; exit 1 ;;
-u|--url ) export BASE_URL="$2" ; shift 2 ;;
-v|--verbose ) export VERBOSE="on" ; shift ;;
+ -w|--want ) export WANT_VERSION=$2 ; shift 2 ;;
--) shift ; break ;;
*) help ; exit ;;
esac
Modified: lunar/branches/stable/usr/share/man/man8/lget.8
===================================================================
--- lunar/branches/stable/usr/share/man/man8/lget.8 2007-03-06 19:20:31 UTC (rev 23519)
+++ lunar/branches/stable/usr/share/man/man8/lget.8 2007-03-06 19:30:33 UTC (rev 23520)
@@ -9,7 +9,7 @@
.PP
.B lget -a|--all
.PP
-.B lget -d|--debug|-f|--from|-u|--url|-v|--verbose
+.B lget -d|--debug|-f|--from|-u|--url|-v|--verbose|-w|--want
module_1 module_2
.SH COPYRIGHT
.if n lget(8) is Copyright (C) 2002-2003 Terry Chan with portions copyrighted by previous authors 2001-2002
@@ -41,8 +41,7 @@
.PP
Enables debug messages, very useful when emailing a bug report.
.TP
-.B lget
--f|--from path/dir
+.B lget -f|--from path/dir
.PP
This specifies a different
.I /var/spool/lunar
@@ -52,12 +51,17 @@
.PP
Outputs short help.
.TP
-.B lget
--u|--url URL module_1
+.B lget -u|--url URL module_1
.PP
This tries to download the specified module from a different location. This is
useful if the original link is down.
.TP
+.B lget -w|--want version
+.PP
+Attempt to download version version of the module by substituting the current
+version of the module with the wanted version. May fail if the package requires
+more than one file download, or other reasons.
+.TP
.B lget -v|--verbose
.PP
Increases the level of message output
Modified: lunar/branches/stable/var/lib/lunar/functions/aliases.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/aliases.lunar 2007-03-06 19:20:31 UTC (rev 23519)
+++ lunar/branches/stable/var/lib/lunar/functions/aliases.lunar 2007-03-06 19:30:33 UTC (rev 23520)
@@ -54,7 +54,11 @@
for TARGET in $TARGETS ; do
((N++))
TARGETBYNUM[$N]=$TARGET
- error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR}"
+ if module_installed $TARGET ; then
+ error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${LRM_COLOR}(Installed)${DEFAULT_COLOR}"
+ else
+ error_message " ${QUERY_COLOR}$N${MESSAGE_COLOR} - ${DEFAULT_COLOR}${MODULE_COLOR}$TARGET${DEFAULT_COLOR} ${MESSAGE_COLOR}(Not installed)${DEFAULT_COLOR}"
+ fi
done
read CHOICE
# test directly first
Modified: lunar/branches/stable/var/lib/lunar/functions/messages.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/messages.lunar 2007-03-06 19:20:31 UTC (rev 23519)
+++ lunar/branches/stable/var/lib/lunar/functions/messages.lunar 2007-03-06 19:30:33 UTC (rev 23520)
@@ -167,8 +167,9 @@
# mquery is a wrapper to autodetect if a certain y/n parameter in a module
# config is not set yet and handles the case in a single function
-# usage: mqeury USE_LILO "Use lilo instead of grub" ?
+# usage: mquery USE_LILO "Use lilo instead of grub ?" y [yesopts] [noopts]
# note : $MODULE must be set properly
+# note : both [yesopts] and [noopts] may be empty or ""
mquery()
{
debug_msg "mquery ($@)"
@@ -181,6 +182,12 @@
set_module_config "$1" n
fi
fi
+ # and lookup the result in case of yes/no opts
+ if [ $(get_module_config $1) == "y" ] ; then
+ OPTS="$OPTS $4"
+ else
+ OPTS="$OPTS $5"
+ fi
fi
}
More information about the Lunar-commits
mailing list