[Lunar-commits] CVS: theedge/var/lib/lunar/functions build.lunar,
1.17, 1.18 config.lunar, 1.5, 1.6 depends.lunar, 1.26,
1.27 messages.lunar, 1.14, 1.15 modules.lunar, 1.30,
1.31 optimize.lunar, 1.45, 1.46
Auke Kok
sofar at lunar-linux.org
Mon Feb 23 21:15:56 GMT 2004
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv6251/var/lib/lunar/functions
Modified Files:
build.lunar config.lunar depends.lunar messages.lunar
modules.lunar optimize.lunar
Log Message:
cosmetic cleanups for mod_v stuff, xterm_msg code, hardkrash' config etc,
pipelining improved for lin, this is a long pending improvement that was needed,
another addition to moonbase installs, one that helps on clean or taken-over boxes,
clear msg for MAKES optimize question field
Index: build.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/build.lunar,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- build.lunar 11 Jan 2004 22:33:22 -0000 1.17
+++ build.lunar 23 Feb 2004 21:15:53 -0000 1.18
@@ -183,13 +183,12 @@
default_make() {
debug_msg "default_make ($@)"
verbose_msg "running \"default_make\""
- # This code is simular to the optimize_make
- # function from optimize.lunar
+ # This code is simular to the optimize_make function from optimize.lunar
# This is needed because bash does not expand aliases in functions
- if module_installed linux-openmosix; then
+ if module_installed linux-openmosix ; then
if [[ "$MAKES" > 1 ]] ; then
mosrun -h make -j$MAKES
- else
+ else
mosrun -h make
fi
elif [[ $MAKES > 1 ]] ; then
@@ -198,7 +197,7 @@
make
fi &&
prepare_install &&
- make install
+ make install
} > $C_FIFO 2>&1
Index: config.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/config.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- config.lunar 12 Jan 2004 06:51:27 -0000 1.5
+++ config.lunar 23 Feb 2004 21:15:53 -0000 1.6
@@ -14,11 +14,8 @@
# #
# Copyrighted Kagan Kongar 2002 under GPLv2 #
# #
-# Parts copyrighted Steven Michalske 2004 under GPLv2 #
-# #
############################################################
-
# function: write_config
# usage : write_config <line to remove> [<line to add>]
# purpose : removes a line from the $LOCAL_CONFIG and adds another (if given)
@@ -31,8 +28,7 @@
LOCAL_CONFIG_BACKUP="/tmp/lunar.localconfigbackup.$$"
rm -f $LOCAL_CONFIG_BACKUP 2>/dev/null
- function handle_trap()
- {
+ function handle_trap() {
cp $LOCAL_CONFIG_BACKUP $LOCAL_CONFIG 2>/dev/null
unlock_file $LOCAL_CONFIG
rm -f $TMP_LOCAL_CONFIG 2>/dev/null
@@ -79,24 +75,23 @@
get_module_configured(){
debug_msg "module_configured ($@)"
- if [ "$#" -ne "1" ]; then
+ if [ "$#" -ne "1" ] ; then
message "${PROBLEM_COLOR}Configuration date missing, assuming unconfigured."
message "${MESSAGE_COLOR}Please inform the lunar devlopers of this issue. ${DEFAULT_COLOR}"
return false
fi
- # Check for file, return false for missing
- if [ ! -f "$MODULE_CONFIG" ]; then
+ # Check for file, return false for missing
+ if [ ! -f "$MODULE_CONFIG" ] ; then
debug_msg "Config file for $MODULE not found"
return false
fi
# Check for configured date flag
- MC_CONFIG_DATE=`grep "CONFIGURED=" $MODULE_CONFIG | \
- sed "s:.*=\([0-9]*\)[^0-9]*:\1:"`
- if [ -n "$MC_CONFIG_DATE" ]; then
- if [ "$MC_CONFIG_DATE" -le "$1" ]; then
- # the file is old, reconfigure
+ MC_CONFIG_DATE=$(grep "CONFIGURED=" $MODULE_CONFIG | sed "s:.*=\([0-9]*\)[^0-9]*:\1:")
+ if [ -n "$MC_CONFIG_DATE" ] ; then
+ if [ "$MC_CONFIG_DATE" -le "$1" ] ; then
+ # the file is old, reconfigure
return false
else
# configuration current
@@ -109,14 +104,11 @@
# function: set_module_configured
-# usage: set_module_configured [<quoted list of lines to append to file>]
-# purpose: to freshen the module configuration file with current config date
-
+# usage: set_module_configured [<quoted list of lines to append to file>] -# purpose: to freshen the module configuration file with current config date
set_module_configured() {
debug_msg "set_module_configured ($@)"
- echo "CONFIGURED=`date -u +%Y%m%d`" > $MODULE_CONFIG
- for line in $@
- do
- echo $line >> $MODULE_CONFIG
+ echo "CONFIGURED=$(date -u +%Y%m%d)" > $MODULE_CONFIG
+ for line in $@ ; do
+ echo "$line" >> $MODULE_CONFIG
done
}
Index: depends.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/depends.lunar,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- depends.lunar 21 Jan 2004 16:32:53 -0000 1.26
+++ depends.lunar 23 Feb 2004 21:15:53 -0000 1.27
@@ -70,18 +70,18 @@
sort_by_dependency() {
debug_msg "sort_by_dependency ($@)"
- included=""
+ unset INCLUDED
recurse() {
for MOD in $* ; do
- if echo "$included" | grep -qFx "$MOD" ; then
+ if echo "$INCLUDED" | grep -qFx "$MOD" ; then
debug_msg "Cutoff: $MOD"
else
LIST=$(grep ^$MOD: $DEPENDS_STATUS | grep ":on:" | cut -d: -f2)
for DEP in $LIST ; do
echo $MOD $DEP
done
- included=$included$'\n'$MOD
+ INCLUDED=$INCLUDED'\n'$MOD
recurse $LIST
fi
done
@@ -213,9 +213,12 @@
prepare_depends_status
grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
if [ -s "$SCRIPT_DIRECTORY/DEPENDS" ] ; then
- message "${CHECK_COLOR}Checking dependencies for" \
- "${MODULE_COLOR}${MODULE}" \
- "${DEFAULT_COLOR}"
+ if [ -n "$SINGLE_MODULE" ] ; then
+ # we only need to show this once, but we get here twice per module
+ message "${CHECK_COLOR}Checking dependencies for" \
+ "${MODULE_COLOR}${MODULE}" \
+ "${DEFAULT_COLOR}"
+ fi
run_module_file $MODULE DEPENDS
fi
}
Index: messages.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/messages.lunar,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- messages.lunar 29 Dec 2003 18:09:42 -0000 1.14
+++ messages.lunar 23 Feb 2004 21:15:53 -0000 1.15
@@ -72,7 +72,7 @@
debug_msg "xterm_bar ($@)"
case $TERM in
xterm*|gnome*|konsole*|rxvt*)
- echo "]0; $* "
+ echo -n "]0; $* "
;;
esac
}
Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/modules.lunar,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- modules.lunar 29 Dec 2003 18:09:42 -0000 1.30
+++ modules.lunar 23 Feb 2004 21:15:53 -0000 1.31
@@ -369,6 +369,11 @@
remove_module() {
debug_msg "remove_module ($@)"
+ # catch this on new boxes:
+ if [ ! -f $MODULE_STATUS ] ; then
+ touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
+ fi
+
verbose_msg "updating lunar state files after module removal"
lock_file $MODULE_STATUS &&
lock_file $MODULE_STATUS_BACKUP &&
@@ -400,6 +405,12 @@
# purpose : adds the 1st parameter as the module name to the MODULE_STATUS files
add_module() {
debug_msg "add_module ($@)"
+
+ # catch this on new boxes:
+ if [ ! -f $MODULE_STATUS ] ; then
+ touch $MODULE_STATUS $MODULE_STATUS_BACKUP $DEPENDS_STATUS $DEPENDS_STATUS_BACKUP
+ fi
+
verbose_msg "updating lunar state files after module installation"
lock_file $MODULE_STATUS &&
lock_file $MODULE_STATUS_BACKUP &&
Index: optimize.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/optimize.lunar,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- optimize.lunar 14 Jan 2004 20:42:29 -0000 1.45
+++ optimize.lunar 23 Feb 2004 21:15:53 -0000 1.46
@@ -910,8 +910,12 @@
--nocancel \
--stdout \
--inputbox \
- "Enter the number of concurrent makes ( > 1 ). Or leave this BLANK!" \
+ "Enter the number of concurrent makes ( a value > 1 ) or leave this field empty." \
0 55 $MAKES`
+ # people WILL fill in 1... so, we knock them down and take their money:
+ if [[ $MAKES -lt 2 ]] ; then
+ unset MAKES
+ fi
STACK=`dialog --title "Set stack parameters. (WARNING! Best left empty!)" \
--nocancel \
More information about the Lunar-commits
mailing list