CVS: theedge/var/lib/lunar/functions build.lunar, 1.6,
1.7 check.lunar, 1.2, 1.3 config.lunar, 1.1.1.1,
1.2 connect.lunar, 1.1, 1.2 depends.lunar, 1.13,
1.14 download.lunar, 1.27, 1.28 edit.lunar, 1.5,
1.6 init.lunar, 1.2, 1.3 install.lunar, 1.9,
1.10 locking.lunar, 1.2, 1.3 main.lunar, 1.1,
1.2 messages.lunar, 1.7, 1.8 misc.lunar, 1.2,
1.3 modules.lunar, 1.22, 1.23 moonbase.lunar, 1.9,
1.10 optimize.lunar, 1.37, 1.38 postbuild.lunar, 1.5,
1.6 prune.lunar, 1.3, 1.4 queue.lunar, 1.1.1.1,
1.2 recovery.lunar, 1.1.1.1, 1.2 sizes.lunar, 1.2,
1.3 sources.lunar, 1.11, 1.12 temp.lunar, 1.2,
1.3 tracking.lunar, 1.2, 1.3 uniqid.lunar, 1.3,
1.4 updatelog.lunar, 1.10, 1.11 useradd.lunar, 1.2,
1.3 view.lunar, 1.1, 1.2
elaine at lunar-linux.org
elaine at lunar-linux.org
Mon Jul 28 17:41:59 GMT 2003
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv27637
Modified Files:
build.lunar check.lunar config.lunar connect.lunar
depends.lunar download.lunar edit.lunar init.lunar
install.lunar locking.lunar main.lunar messages.lunar
misc.lunar modules.lunar moonbase.lunar optimize.lunar
postbuild.lunar prune.lunar queue.lunar recovery.lunar
sizes.lunar sources.lunar temp.lunar tracking.lunar
uniqid.lunar updatelog.lunar useradd.lunar view.lunar
Log Message:
debug-msg ified all functions in /var/lib/lunar/functions/*.lunar
Index: build.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/build.lunar,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- build.lunar 27 Jul 2003 23:05:32 -0000 1.6
+++ build.lunar 28 Jul 2003 17:41:56 -0000 1.7
@@ -1,4 +1,3 @@
-############################################################
# #
# subroutines - Lunar subroutines #
# #
@@ -561,7 +560,7 @@
archive() {
debug_msg "archive ($@)"
-
+
LINES=`wc -l < $INST_LOG`
(( CHUNKS = LINES / 1024 ))
(( REMAINDER = LINES % 1024 ))
@@ -608,7 +607,6 @@
boost() { (
- debug_msg "boost ($@)"
CACHE="/tmp/$MODULE-$VERSION-$BUILD.tar"
CACHE_BZ="$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2"
Index: check.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/check.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- check.lunar 27 Apr 2003 17:24:56 -0000 1.2
+++ check.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# check/lunar - checking functions #
# #
@@ -26,6 +25,7 @@
ldd_check() { (
+ debug_msg "ldd_check ($@)"
if [ "$LDD_CHECK" == "off" ] ; then
return
fi
@@ -68,6 +68,7 @@
find_check() { (
+ debug_msg "find_check ($@)"
if [ "$FIND_CHECK" == "off" ] ||
[ "$1" == "xfree86" ] ||
[ "$1" == "xfree86-custom" ]; then
@@ -114,6 +115,7 @@
sym_check() { (
+ debug_msg "sym_check ($@)"
if [ "$SYM_CHECK" == "off" ]; then
return
fi
@@ -147,6 +149,7 @@
md5sum_check() { (
+ debug_msg "md5sum_check ($@)"
if [ "$MD5SUM_CHECK" == "off" ]; then
return
fi
@@ -203,6 +206,7 @@
run_checks() {
+ debug_msg "run_checks ($@)"
sym_check $1
find_check $1 &&
ldd_check $1 &&
Index: config.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/config.lunar,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- config.lunar 21 Aug 2002 00:59:02 -0000 1.1.1.1
+++ config.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
Index: connect.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/connect.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- connect.lunar 20 Jul 2003 15:35:25 -0000 1.1
+++ connect.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-#!/bin/sh
############################################################
# #
# download.lunar - get sources from the net #
@@ -34,6 +33,7 @@
connect() {
+ debug_msg "connect ($@)"
if ! ifconfig | grep -q "^eth" &&
! ifconfig | grep -q "^wlan" &&
@@ -59,6 +59,7 @@
disconnect() {
+ debug_msg "disconnect ($@)"
if ps -C disconnect > /dev/null
then return
fi
Index: depends.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/depends.lunar,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- depends.lunar 22 Jul 2003 21:01:29 -0000 1.13
+++ depends.lunar 28 Jul 2003 17:41:56 -0000 1.14
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -28,9 +27,11 @@
# usage : find_depends "module name"
# purpose : recursive dependency finder, no need to be installed
function find_depends() {
+ debug_msg "function find_depends ($@)"
# as always, use private depends() and optional_depends() functions
depends () {
+ debug_msg " depends ($@)"
if ! $(echo $FOUND_DEPENDS | grep -qw $1) ; then
export FOUND_DEPENDS="$FOUND_DEPENDS $1"
find_depends $1
@@ -39,6 +40,7 @@
}
optional_depends() {
+ debug_msg " optional_depends ($@)"
if ! $(echo $FOUND_DEPENDS | grep -qw $1) ; then
if module_installed $1 ; then
export FOUND_DEPENDS="$FOUND_DEPENDS $1"
@@ -64,18 +66,21 @@
is_depends() { (
+ debug_msg "is_depends ($@)"
# Is $1 a previously selected dependency of any module.
return $(cat $DEPENDS_STATUS | cut -d: -f2- | grep -q "^$1:on:")
) }
in_depends() {
+ debug_msg "in_depends ($@)"
# Was $2 presented as a depenency for module $1
return $(grep -q "^$1:$2:" $DEPENDS_STATUS)
}
remove_depends() {
+ debug_msg "remove_depends ($@)"
lock_file $DEPENDS_STATUS_BACKUP &&
lock_file $DEPENDS_STATUS ||
return 1
@@ -99,6 +104,7 @@
add_depends() {
+ debug_msg "add_depends ($@)"
if ! grep -q "^$1:$2:$3:$4:$5:$6$" $DEPENDS_STATUS ; then
if grep -q "^$1:$2:" $DEPENDS_STATUS ; then
remove_depends "$1" "$2"
@@ -117,8 +123,10 @@
run_depends() {
+ debug_msg "run_depends ($@)"
# local definitions of depends and optional_depends!
depends() {
+ debug_msg " depends ($@)"
grep -q "^"$1"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
if ! module_installed $1 && ! module_held $1 ; then
@@ -137,6 +145,7 @@
}
optional_depends() {
+ debug_msg " optional_depends ($@)"
# parameters: $1 = module name
# $2 = configure parameter if module wanted
# $3 = configure parameter if module declined
@@ -177,9 +186,11 @@
# rework_module : check depends database for a module
rework_module() {
+ debug_msg "rework_module ($@)"
# we declare these local to override the systems default ones:
optional_depends() {
+ debug_msg " optional_depends ($@)"
if module_exiled $1
then add_depends "$MODULE" "$1" "off" "optional" "$2" "$3"
else
@@ -192,6 +203,7 @@
}
depends() {
+ debug_msg " depends ($@)"
if ! module_installed $1 &&
! module_held $1
then
@@ -206,6 +218,7 @@
add_depends "$MODULE" "$1" "on" "required" "$2" "$3"
}
run_depends() {
+ debug_msg " run_depends ($@)"
if [ -s $SCRIPT_DIRECTORY/DEPENDS ] ; then
show_fancy_progress "Processing: $MODULE"
run_module_file $MODULE DEPENDS
@@ -310,6 +323,7 @@
# rework_list : rework a list of modules and save output
rework_list() {
+ debug_msg "rework_list ($@)"
for MODULE in $* ; do
module_exiled $MODULE || rework_module $MODULE
@@ -320,6 +334,7 @@
# fix_depends : single pass to fix depends database
fix_depends () {
+ debug_msg "fix_depends ($@)"
TMP=/tmp/lunar.fix
[ -d $TMP ] || mkdir -p $TMP
@@ -413,6 +428,7 @@
# NOTE: this is where a missing dependency gets installed! IOW we really do
# "satisfy" any dependencies here!
satisfy_depends() {
+ debug_msg "satisfy_depends ($@)"
if [ -n "$DEPS_ONLY" ] ; then
return 0
fi
@@ -456,6 +472,7 @@
# conflicts... remove conflicting modules
conflicts() {
+ debug_msg "conflicts ($@)"
if module_installed $1 ; then
lrm $1
fi
Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- download.lunar 27 Jul 2003 23:05:32 -0000 1.27
+++ download.lunar 28 Jul 2003 17:41:56 -0000 1.28
@@ -1,4 +1,3 @@
-#!/bin/sh
############################################################
# #
# download.lunar - get sources from the net #
@@ -400,7 +399,7 @@
testpack () {
- debug_msg "testpack ($@)"
+ debug_msg "testpack ($@)"
FILENAME=`guess_filename $1` || FILENAME=`guess_filename $SOURCE_CACHE/$1`
if [ -f $FILENAME ] ; then
COMPRESSOR=`file -b $FILENAME | cut -d ' ' -f1`
Index: edit.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/edit.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- edit.lunar 17 Jul 2003 20:43:48 -0000 1.5
+++ edit.lunar 28 Jul 2003 17:41:56 -0000 1.6
@@ -1,4 +1,3 @@
-####################################################################
# #
# edit.lunar - functions to edit files #
# #
@@ -73,6 +72,7 @@
# usage : edit_file FILENAME
# purpose : to edit a file
edit_file() {
+ debug_msg "edit_file ($@)"
${EDITOR:-nano} $1
}
Index: init.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/init.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- init.lunar 8 Jun 2003 19:30:47 -0000 1.2
+++ init.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# init.lunar - Lunar subroutines #
# #
@@ -29,6 +28,7 @@
# usage : enviro_check
# purpose : check if the shell is proper
enviro_check() {
+ debug_msg "enviro_check ($@)"
if [ -z "$SHELL" ] || [ "$USER" != "root" ] ; then
message "${PROBLEM_COLOR}WARNING:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
"You are not running a fully initialized root shell, consider"
@@ -41,6 +41,7 @@
# usage : root_check
# purpose : check if the user is root
root_check() {
+ debug_msg "root_check ($@)"
if [ "$UID" != "0" ] ; then
message "${PROBLEM_COLOR}ERROR:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
"User must have root privileges to run this program" \
@@ -54,6 +55,7 @@
# usage : set_priority
# purpose : force niceness on lunar's processes
set_priority() {
+ debug_msg "set_priority ($@)"
LUNAR_PRIORITY=${LUNAR_PRIORITY:="+10"}
renice "$LUNAR_PRIORITY" -p $$ 2> /dev/null >/dev/null
}
Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/install.lunar,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- install.lunar 27 Jul 2003 23:05:32 -0000 1.9
+++ install.lunar 28 Jul 2003 17:41:56 -0000 1.10
@@ -1,4 +1,3 @@
-#!/bin/bash
############################################################
# #
# install.lunar - install Lunar modules #
@@ -135,7 +134,7 @@
start_logging () {
- debug_msg "start_logging ($@)"
+ debug_msg "start_logging ($@)"
export C_LOG=$(temp_create "${MODULE}.compile-log")
export C_FIFO=$(temp_create "${MODULE}.compile-fifo")
Index: locking.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/locking.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- locking.lunar 15 Mar 2003 18:23:57 -0000 1.2
+++ locking.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
Index: main.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/main.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- main.lunar 13 Jul 2003 20:49:54 -0000 1.1
+++ main.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -20,6 +19,7 @@
# usage : renew
# purpose : frontend function that includes all renewing code
renew() {
+ debug_msg "renew ($@)"
message "${MESSAGE_COLOR}Starting update of installed modules${DEFAULT_COLOR}"
purge_modules
@@ -48,6 +48,7 @@
update() {
+ debug_msg "update ($@)"
if ps -C lin > /dev/null; then
echo "Unable to update lunar concurrently while installing."
sleep 5
@@ -66,6 +67,7 @@
rebuild() {
+ debug_msg "rebuild ($@)"
rm -f $INSTALL_QUEUE
message "To do a non recursive rebuild"
@@ -99,6 +101,7 @@
# usage : prune
# purpose : prune all old logs, source copy's, install caches
prune() {
+ debug_msg "prune ($@)"
message "${MESSAGE_COLOR}Generating a keep list..." \
"${DEFAULT_COLOR}"
@@ -167,6 +170,7 @@
resurrect_modules() {
+ debug_msg "resurrect_modules ($@)"
for MODULE in $@ ; do
if run_details $MODULE ; then
resurrect $MODULE
Index: messages.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/messages.lunar,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- messages.lunar 27 Jul 2003 23:05:32 -0000 1.7
+++ messages.lunar 28 Jul 2003 17:41:56 -0000 1.8
@@ -1,4 +1,3 @@
-############################################################
# #
# messages - lunar message display functions #
# #
@@ -30,17 +29,18 @@
message() {
+ debug_msg "message ($@)"
[ -n "$SILENT" ] || echo -e "$*"
}
verbose_msg() {
+ debug_msg "verbose_msg ($@)"
[ "$VERBOSE" != "on" ] || message "+ $*"
}
-
debug_msg() {
- if [ -n "$DEBUG" ] ; then
+ if [ -n "$LUNAR_DEBUG" ] ; then
echo "++ $@" > /dev/stderr
fi
}
@@ -111,7 +111,7 @@
color() {
- debug_msg "color($@)"
+ debug_msg "color ($@)"
case $1 in
off) unset MODULE_COLOR
unset VERSION_COLOR
@@ -148,6 +148,7 @@
# usage : show_fancy_progress <fancy_progress_var_string>
# purpose : display progress ex: show_fancy_progress "Processing: $MODULE"
show_fancy_progress () {
+ debug_msg "show_fancy_progress ($@)"
echo -en "\r \r$1\r"
}
Index: misc.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/misc.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- misc.lunar 30 Apr 2003 22:46:07 -0000 1.2
+++ misc.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# misc.lunar - Lunar subroutines #
# #
@@ -30,6 +29,7 @@
# usage : VARIABLE=`directories < dirlistfile`
# purpose : to determine the directories from a given list
directories() {
+ debug_msg "directories ($@)"
while read ITEM ; do
if [ -d "$ITEM" ] && [ ! -h "$ITEM" ] ; then
echo "$ITEM"
@@ -42,6 +42,7 @@
# usage : VARIABLE=`files < dirlistfile`
# purpose : to determine the ordinary files from a given list
files() {
+ debug_msg "files ($@)"
while read ITEM ; do
if [ -f "$ITEM" ] && [ ! -h "$ITEM" ] ; then
echo "$ITEM"
@@ -54,6 +55,7 @@
# usage : VARIABLE=`symlinks < dirlistfile`
# purpose : to determine the symbolic links from a given list
symlinks() {
+ debug_msg "symlinks ($@)"
while read ITEM ; do
if [ -h "$ITEM" ] ; then
echo "$ITEM"
@@ -66,6 +68,7 @@
# usage : VARIABLE=`dirnames < dirlistfile`
# purpose : info about the real locations of symlinks
dirnames() {
+ debug_msg "dirnames ($@)"
while read FILE ; do
dirname "$FILE"
done
@@ -76,6 +79,7 @@
# usage : VARIABLE=`exists < dirlistfile`
# purpose : filter out the non-existent files in a list
exists() {
+ debug_msg "exists ($@)"
while read ITEM ; do
if [ -e "$ITEM" ] ; then
echo $ITEM
@@ -88,6 +92,7 @@
# usage : guess_filename <filename>
# purpose : fuzzy check for the existance of the filename
guess_filename() {
+ debug_msg "guess_filename ($@)"
FILENAME=$1
BASENAME=${FILENAME/.tar.gz/}
BASENAME=${BASENAME/.tar.bz2/}
@@ -113,6 +118,7 @@
# usage : filter $FILE
# purpose : filter stdin with files/dirs/symlinks provided in file $1.
filter() {
+ debug_msg "filter ($@)"
if [ -f $1 ] ; then
grep -v $(
for DIR in `directories < $1 2>/dev/null` ; do
Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/modules.lunar,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- modules.lunar 17 Jul 2003 20:19:17 -0000 1.22
+++ modules.lunar 28 Jul 2003 17:41:56 -0000 1.23
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -28,6 +27,7 @@
# usage : list_sections
# purpose : list the moonbase sections, filter out the specific files
list_sections() {(
+ debug_msg "list_sections ($@)"
check_module_index
SECTIONS=$(grep -v ^MOONBASE_MD5 $MODULE_INDEX 2>/dev/null | \
cut -d : -f 2-2 | sort | uniq)
@@ -51,6 +51,7 @@
# usage : list_modules $SECTION
# purpose : list the modules in a section, filter out the specific files
list_modules() {(
+ debug_msg "list_modules ($@)"
if [ -z "$1" ] ; then
message "${PROBLEM_COLOR}list_modules(): no SECTION defined!${DEFAULT_COLOR}"
exit 1
@@ -69,6 +70,7 @@
# usage : list_moonbase
# purpose : returns the names of all modules in moonbase
list_moonbase() {(
+ debug_msg "list_moonbase ($@)"
for SECTION in $(list_sections) ; do
list_modules $SECTION
done
@@ -79,6 +81,7 @@
# usage : list_installed
# purpose : return a list of installed (or held) modules
list_installed() {
+ debug_msg "list_installed ($@)"
grep -e ":installed:" -e ":held:" $MODULE_STATUS | cut -d: -f1 | sort
}
@@ -87,6 +90,7 @@
# usage : create_module_index
# purpose : created an index file of module:section pair list
create_module_index() {
+ debug_msg "create_module_index ($@)"
# make sure it exists before trying to see it's writeable
touch $MODULE_INDEX &> /dev/null
@@ -114,6 +118,7 @@
# usage : check_module_index
# purpose : checks if the index is up-to-date regarding to moonbase
function check_module_index() {
+ debug_msg "function check_module_index ($@)"
if [ `get_moonbase_md5` != `set_moonbase_md5` ] ; then
create_module_index
return 0
@@ -128,6 +133,7 @@
# purpose : finds the section of a given module as parameter
# returns : (0) on success, (1) on failure, errors on stdout
find_section() {(
+ debug_msg "find_section ($@)"
SECTION=$(grep ^$1: $MODULE_INDEX 2>/dev/null | head -n 1 | cut -d: -f2)
if [ -n "$SECTION" ] ; then
if [ -d $MOONBASE/$SECTION/$1 ] ; then
@@ -162,6 +168,7 @@
# purpose : runs the DETAILS file of a module
# returns : (0) on success, (1) on failure, error messages on stdout
run_details() {
+ debug_msg "run_details ($@)"
# Note: run_details doesn't EXIT the code, but merely drops a warning
# (return 1), which means that the calling code needs to decide
# if this is a problem or not... -sofar
@@ -192,6 +199,7 @@
# usage : run_module_file $MODULE $SCRIPTNAME
# purpose : runs the given script for a pre-defined module
run_module_file() {
+ debug_msg "run_module_file ($@)"
if [ -z "$SCRIPT_DIRECTORY" ] ; then
if ! run_details $1 &> /dev/null ; then
return 1
@@ -216,6 +224,7 @@
# usage : module_held $MODULE
# purpose : check if $MODULE is held
module_held() {
+ debug_msg "module_held ($@)"
$(cat $MODULE_STATUS | cut -d: -f1,3 | grep -q "^$1:held")
}
@@ -224,6 +233,7 @@
# usage : module_exiled $MODULE
# purpose : check if $MODULE is exiled
module_exiled() {
+ debug_msg "module_exiled ($@)"
$(cat $MODULE_STATUS | cut -d: -f1,3 | grep -q "^$1:exiled")
}
@@ -232,6 +242,7 @@
# usage : installed_version $MODULE
# purpose : return the installed version of $MODULE
installed_version() {
+ debug_msg "installed_version ($@)"
grep "^$1:" $MODULE_STATUS | cut -d: -f4
}
@@ -240,6 +251,7 @@
# usage : hold_modules $MODULE [$MODULE....]
# purpose : put modules on hold
hold_modules() {
+ debug_msg "hold_modules ($@)"
if [ -n "$1" ] ; then
lock_file $MODULE_STATUS_BACKUP
lock_file $MODULE_STATUS
@@ -258,6 +270,7 @@
# usage : unhold_modules $MODULE [$MODULE....]
# purpose : put modules on hold back to normal
unhold_modules () {
+ debug_msg "unhold_modules ($@)"
if [ -n "$1" ] ; then
lock_file $MODULE_STATUS_BACKUP
lock_file $MODULE_STATUS
@@ -276,6 +289,7 @@
# usage : exile_modules $MODULE [$MODULE....]
# purpose : put modules on exile
exile_modules() {
+ debug_msg "exile_modules ($@)"
if [ -n "$1" ] ; then
lock_file $MODULE_STATUS_BACKUP
lock_file $MODULE_STATUS
@@ -294,6 +308,7 @@
# usage : unexile_modules $MODULE [$MODULE....]
# purpose : put modules on exile back to normal
unexile_modules () {
+ debug_msg "unexile_modules ($@)"
if [ -n "$1" ] ; then
lock_file $MODULE_STATUS_BACKUP
lock_file $MODULE_STATUS
@@ -309,6 +324,7 @@
module_needs_update () {
+ debug_msg "module_needs_update ($@)"
if [ -n "$1" ] ; then
:
else
Index: moonbase.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/moonbase.lunar,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- moonbase.lunar 14 Jul 2003 22:38:20 -0000 1.9
+++ moonbase.lunar 28 Jul 2003 17:41:56 -0000 1.10
@@ -1,4 +1,3 @@
-############################################################
# #
# moonbase.lunar - get moonbase from the net #
# #
@@ -10,11 +9,13 @@
get_moonbase () {(
+ debug_msg "get_moonbase ($@)"
SYSTEM_MOONBASE=/var/lib/lunar/moonbase
# the following overrides run_details:
run_details() {
+ debug_msg " run_details ($@)"
MODULE=moonbase
VERSION=`date -u +%Y%m%d.%H`
SOURCE=$(basename $MOONBASE_URL)
@@ -78,6 +79,7 @@
# usage : set_moonbase_md5
# purpose : creates the md5 value of overall moonbase
set_moonbase_md5() {
+ debug_msg "set_moonbase_md5 ($@)"
MOONBASE_MD5=$(echo $MOONBASE/*/* | md5sum | cut -d "-" -f 1-1)
echo $MOONBASE_MD5
}
@@ -87,6 +89,7 @@
# usage : get_moonbase_md5
# purpose : graps the MOONBASE_MD5 line from the $MODULE_INDEX
get_moonbase_md5() {
+ debug_msg "get_moonbase_md5 ($@)"
MOONBASE_MD5=$(grep ^MOONBASE_MD5: $MODULE_INDEX | tail -1 2>/dev/null | \
cut -d : -f 2-2)
if [ -z "$MOONBASE_MD5" ] ; then
Index: optimize.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/optimize.lunar,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- optimize.lunar 18 Jul 2003 03:08:12 -0000 1.37
+++ optimize.lunar 28 Jul 2003 17:41:56 -0000 1.38
@@ -1,4 +1,3 @@
-#Copyrighted Jason Johnston 2002 under GPLv2
# All specified optimizations are system wide,
# and apply to any module built using lin.
@@ -53,6 +52,7 @@
# Usage : bad_flags "list of flags to remove"
# Example : bad_flags -ffast-math -funroll-loops
bad_flags() {
+ debug_msg "bad_flags ($@)"
verbose_msg "bad_flags \"$@\""
if [[ $1 == "ALL" ]]; then
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
@@ -72,6 +72,7 @@
use_wrappers() {
+ debug_msg "use_wrappers ($@)"
if [ "$GCCWRAPPERS" == "on" ] ; then
verbose_msg "Enabling gcc wrapper scripts to force optimizations"
export PATH=/var/lib/lunar/compilers:${PATH}
@@ -80,6 +81,7 @@
optimize_make() {
+ debug_msg "optimize_make ($@)"
if [[ $PSAFE == "no" ]]; then
unset MAKES
fi
@@ -99,6 +101,7 @@
optimize_base() {
+ debug_msg "optimize_base ($@)"
if ! [[ $1 ]]; then
BOPT="None"
fi
@@ -128,6 +131,7 @@
optimize_cpu() {
+ debug_msg "optimize_cpu ($@)"
if ! [[ $1 ]]; then
if [[ $PLATFORM == "Alpha" ]]; then
CPU="ev4"
@@ -486,6 +490,7 @@
optimize_speed() {
+ debug_msg "optimize_speed ($@)"
for A in ${SPD[@]}; do
case $A in
None) CFLAGS="$CFLAGS"
@@ -605,6 +610,7 @@
optimize_stack() {
+ debug_msg "optimize_stack ($@)"
if [[ $STACK > 0 ]]; then
if [[ $PLATFORM == "x86" ]]; then
STACK="-mpreferred-stack-boundary=$STACK"
@@ -617,6 +623,7 @@
optimize_extra() {
+ debug_msg "optimize_extra ($@)"
for A in ${XTRA[@]}; do
case $A in
None) CFLAGS="$CFLAGS"
@@ -654,6 +661,7 @@
# Set how floating point math is done
optimize_fp() {
+ debug_msg "optimize_fp ($@)"
case $1 in
x387) if [[ $GCCVER == "3" ]]; then
CFLAGS="$CFLAGS -mfpmath=387"
@@ -679,6 +687,7 @@
# Set up the Linker optimizations
optimize_ld() {
+ debug_msg "optimize_ld ($@)"
if [[ $LDFLAGS ]]; then
unset LDFLAGS
fi
@@ -703,6 +712,7 @@
optimize_addon() {
+ debug_msg "optimize_addon ($@)"
if ! [[ `grep ADDON /etc/lunar/local/optimizations` ]]; then
echo ADDON=( None ) >> /etc/lunar/local/optimizations
ADDON=( None )
@@ -736,6 +746,7 @@
optimize_ccc_warn() {
+ debug_msg "optimize_ccc_warn ($@)"
for W in ${CCC_WARN[@]}; do
case $W in
Deprecated)
@@ -748,6 +759,7 @@
optimize() {
+ debug_msg "optimize ($@)"
unset CFLAGS CXXFLAGS LDFLAGS
case $PLATFORM in
@@ -813,6 +825,7 @@
# This is the flow control and error checking for the menus.
optimize_architecture() {
+ debug_msg "optimize_architecture ($@)"
# Make sure optimizations file exists, if not create it.
if ! [[ -f /etc/lunar/local/optimizations ]]; then
touch /etc/lunar/local/optimizations
Index: postbuild.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/postbuild.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- postbuild.lunar 7 Apr 2003 20:51:32 -0000 1.5
+++ postbuild.lunar 28 Jul 2003 17:41:56 -0000 1.6
@@ -1,4 +1,3 @@
-############################################################
# #
# postbuild.lunar - Lunar install extensions #
# #
@@ -26,6 +25,7 @@
gather_docs() {
+ debug_msg "gather_docs ($@)"
[ "$GARBAGE" == "on" ] || return 0
DOC_DIR=$DOCUMENT_DIRECTORY/$MODULE
@@ -46,6 +46,7 @@
install_pam_confs() {
+ debug_msg "install_pam_confs ($@)"
if [ -d "$SCRIPT_DIRECTORY/pam.d" ]; then
verbose_msg "handling pam config files"
cd "$SCRIPT_DIRECTORY/pam.d"
@@ -63,6 +64,7 @@
install_xinetd_confs() { (
+ debug_msg "install_xinetd_confs ($@)"
if [ -d "$SCRIPT_DIRECTORY/xinetd.d" ]; then
cd "$SCRIPT_DIRECTORY/xinetd.d"
verbose_msg "handling xinetd config files"
@@ -89,6 +91,7 @@
use_xinetd() { (
+ debug_msg "use_xinetd ($@)"
if [ -d $SCRIPT_DIRECTORY/xinetd.d ] &&
! grep -q "SERVICES=" $MODULE_CONFIG
then
@@ -133,6 +136,7 @@
install_initd() { (
+ debug_msg "install_initd ($@)"
[ -d /etc/init.d ] || mkdir -p /etc/init.d
if [ -d $SCRIPT_DIRECTORY/init.d ] ; then
@@ -168,6 +172,7 @@
use_initd() { (
+ debug_msg "use_initd ($@)"
if [ -d $SCRIPT_DIRECTORY/init.d ] ; then
cd $SCRIPT_DIRECTORY/init.d
@@ -195,6 +200,7 @@
install_services() { (
+ debug_msg "install_services ($@)"
if [ -f $SCRIPT_DIRECTORY/services ]; then
export IFS="$ENTER_IFS"
cat $SCRIPT_DIRECTORY/services |
@@ -207,6 +213,7 @@
install_bashmisc () { (
+ debug_msg "install_bashmisc ($@)"
if [ -d $SCRIPT_DIRECTORY/profile.d ]; then
[ -d /etc/profile.d ] || mkdir -p /etc/profile.d
install -g 0 -o 0 -m 644 $SCRIPT_DIRECTORY/profile.d/*.rc /etc/profile.d
Index: prune.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/prune.lunar,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- prune.lunar 13 Jul 2003 20:49:54 -0000 1.3
+++ prune.lunar 28 Jul 2003 17:41:56 -0000 1.4
@@ -1,4 +1,3 @@
-############################################################
# #
# prune.lunar - Lunar prune code #
# #
@@ -29,6 +28,7 @@
# usage : generate_keep_list
# purpose : generated a list of files which will not be deleted with prune
generate_keep_list() {
+ debug_msg "generate_keep_list ($@)"
for MODULE in $(list_moonbase | sort); do
show_fancy_progress "Processing: $MODULE"
sources $MODULE >> $KEEP
Index: queue.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/queue.lunar,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- queue.lunar 21 Aug 2002 00:59:02 -0000 1.1.1.1
+++ queue.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -26,7 +25,9 @@
# purpose : adds an item to the end of a queue
add_queue() {
+ debug_msg "add_queue ($@)"
in_queue() {
+ debug_msg " in_queue ($@)"
grep -q "^"$2"\$" $1 && return 0 || return 1
}
@@ -44,6 +45,7 @@
# purpose : removes an item from a queue OR pops the first element from a queue
remove_queue() {
+ debug_msg "remove_queue ($@)"
[ -f "$1" ] || return 1
Index: recovery.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/recovery.lunar,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- recovery.lunar 21 Aug 2002 00:59:02 -0000 1.1.1.1
+++ recovery.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -20,6 +19,7 @@
# usage : rebuild_status_files
# purpose : rebuild the accidentally deleted status files
rebuild_status_files() {
+ debug_msg "rebuild_status_files ($@)"
message "${PROBLEM_COLOR} Unable to find MODULE_STATUS files\n" \
"${MODULE_COLOR}$MODULE_STATUS and $MODULE_STATUS_BACKUP" \
"${DEFAULT_COLOR}\n" \
@@ -83,6 +83,7 @@
# usage : replace_status_file
# purpose : cp $MODULE_STATUS_BACKUP $MODULE_STATUS via query
replace_status_file() {
+ debug_msg "replace_status_file ($@)"
if ! [ -f "$MODULE_STATUS_BACKUP" ]; then rebuild_status_files; return; fi
message "${PROBLEM_COLOR}Unable to find MODULE_STATUS file" \
@@ -111,6 +112,7 @@
# usage : check_status_files
# purpose : checks the avail of MODULE_STATUS and MODULE_STATUS_BACKUP files
check_status_files() {
+ debug_msg "check_status_files ($@)"
if ! [ -f "$MODULE_STATUS" ]; then replace_status_file; fi
if ! [ -f "$MODULE_STATUS" ]; then echo "Unknown error!!!"; exit; fi
if ! [ -f "$MODULE_STATUS_BACKUP" ]; then
Index: sizes.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sizes.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sizes.lunar 13 Jul 2003 20:49:54 -0000 1.2
+++ sizes.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
Index: sources.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sources.lunar,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- sources.lunar 27 Jul 2003 21:33:09 -0000 1.11
+++ sources.lunar 28 Jul 2003 17:41:56 -0000 1.12
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -19,6 +18,7 @@
verify_source() {
+ debug_msg "verify_source ($@)"
VERIFIED="true"
for SOURCE_FILE in $@ ; do
if ! guess_filename $SOURCE_CACHE/$1 >/dev/null ; then
@@ -32,6 +32,7 @@
verify_sources() {
+ debug_msg "verify_sources ($@)"
md5_verify_source $(sources $MODULE MD5)
}
@@ -41,6 +42,7 @@
# purpose : displays the filenames and md5sums or VFY part of sources
# for a given module
sources() { (
+ debug_msg "sources ($@)"
MAX_SOURCES=${MAX_SOURCES:=100}
if ! run_details $1 ; then
@@ -88,6 +90,7 @@
# usage : md5_verify_source filename_1 md5_1, filename_2 md52.....
# purpose : md5 verifies a filename
md5_verify_source() {
+ debug_msg "md5_verify_source ($@)"
ALL_OK=true
while [ -n "$2" ]
do
@@ -118,6 +121,7 @@
unpack() {
+ debug_msg "unpack ($@)"
FILENAME=$(guess_filename $SOURCE_CACHE/$1)
@@ -149,43 +153,5 @@
fi
}
-
-
-# usage : gpg_verify_src $SRC $GPG-SIG-URL $GPG-PUBLIC-KEYS-URL
-gpg_verify_source() {
- if [ ! -x /usr/bin/gpg ] ; then
- message "${PROBLEM_COLOR}! Cannot verify sources without ${MODULE_COLOR}gpg${DEFAULT_COLOR}${PROBLEM_COLOR} installed${DEFAULT_COLOR}"
- return 1
- fi
-
- # do we need to download a keyset?
- if [ -n "$3" ] ; then
- TMP_GPG_KEYS=$(temp_create "gpg-pubkeys")
- verbose_msg "Downloading pub keys from \"$3\""
- if wget $3 -O $TMP_GPG_KEYS -q ; then
- GNUPGHOME=/var/state/lunar/ gpg --import $TMP_GPG_KEYS
- fi
- fi
-
- # try to get the required key
- TMP_GPG_SIG=$(temp_create "gpg-signature")
- verbose_msg "Downloading signature \"$2\""
- if wget $2 -O $TMP_GPG_SIG -q ; then
- verbose_msg "Verifying signature of \"$1\""
- verbose_msg "GNUPGHOME=/var/state/lunar/ gpg --verify $TMP_GPG_SIG $1"
- if GNUPGHOME=/var/state/lunar/ gpg --verify $TMP_GPG_SIG $1 ; then
- echo good!
- else
- echo bad!
- fi
-# temp_destroy $TMP_SIG
- verbose_msg "result was \"$?\""
- else
- message "B()RK"
- temp_destroy $TMP_SIG
- exit 1
- fi
-
-}
Index: temp.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/temp.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- temp.lunar 27 Jul 2003 23:05:32 -0000 1.2
+++ temp.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-####################################################################
# #
# temp.lunar - lunar temp code handling #
# #
Index: tracking.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/tracking.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tracking.lunar 13 Jul 2003 20:49:54 -0000 1.2
+++ tracking.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# subroutines - Lunar subroutines #
# #
@@ -26,6 +25,7 @@
boost_locked() {
+ debug_msg "boost_locked ($@)"
[ -f $BOOST_LOCK ] && ps `cat $BOOST_LOCK` | grep -q lin
}
@@ -34,6 +34,7 @@
# usage : invoke_installwatch
# purpose : start logging all disk accesses with installwatch
invoke_installwatch() {
+ debug_msg "invoke_installwatch ($@)"
if [ -e /usr/lib/installwatch.so ] ; then
export LD_PRELOAD=/usr/lib/installwatch.so
fi
@@ -44,6 +45,7 @@
# usage : devoke_installwatch
# purpose : stop logging all disk accesses with installwatch
devoke_installwatch() {
+ debug_msg "devoke_installwatch ($@)"
unset LD_PRELOAD
}
@@ -52,6 +54,7 @@
# usage : parse_iw
# purpose : remove unwanted accesses from the installwatch file
parse_iw() {
+ debug_msg "parse_iw ($@)"
OMIT="^/dev\|^/tmp\|^/usr/src"
OMIT_IN=" rename\| symlink\| unlink"
@@ -64,6 +67,7 @@
# usage : track
# purpose : create an install log
track() {
+ debug_msg "track ($@)"
message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
export IFS="$TAB_ENTER_IFS"
Index: uniqid.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/uniqid.lunar,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- uniqid.lunar 17 Jul 2003 20:19:17 -0000 1.3
+++ uniqid.lunar 28 Jul 2003 17:41:56 -0000 1.4
@@ -1,4 +1,3 @@
-############################################################
# #
# uniqid.lunar - Make a uniqe id for tracking clients #
# #
@@ -10,6 +9,7 @@
push_uniq_id() {
+ debug_msg "push_uniq_id ($@)"
if [ "$UNIQID" == "" ]; then
create_uniq_id
fi
@@ -21,6 +21,7 @@
create_uniq_id() {
+ debug_msg "create_uniq_id ($@)"
if [ $UNIQID >= "" ]; then
return
fi
Index: updatelog.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/updatelog.lunar,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- updatelog.lunar 14 Jul 2003 22:38:20 -0000 1.10
+++ updatelog.lunar 28 Jul 2003 17:41:56 -0000 1.11
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -20,6 +19,7 @@
# usage : display_update_log update|rebuild
# purpose : display a log describing update successes, failures, and summaries
display_update_log() {
+ debug_msg "display_update_log ($@)"
rm -f /var/log/lunar/update
{
if [ -e "$TMP_LIN_SUCCESS" -a -e "$TMP_LIN_FAIL" ] ; then
@@ -33,6 +33,7 @@
# usage : display_success_info update|rebuild
# purpose : display a list of update successes and failures
display_success_info() {
+ debug_msg "display_success_info ($@)"
NUMSUCCESS=$(cat $TMP_LIN_SUCCESS | wc -l)
NUMFAILURES=$(cat $TMP_LIN_FAIL | wc -l)
@@ -61,6 +62,7 @@
# usage : display_moonbase_changes
# purpose : display a list of modules added or removed during this update
display_moonbase_changes() {
+ debug_msg "display_moonbase_changes ($@)"
if [ -e "$MODULE_INDEX" ] && [ -e "$TMP_MODULE_INDEX" ]; then
NEW_MODULES=$(diff -I MOONBASE_MD5 $MODULE_INDEX $TMP_MODULE_INDEX | grep '<' | wc -l)
DEL_MODULES=$(diff -I MOONBASE_MD5 $MODULE_INDEX $TMP_MODULE_INDEX | grep '>' | wc -l)
Index: useradd.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/useradd.lunar,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- useradd.lunar 17 Jul 2003 20:43:48 -0000 1.2
+++ useradd.lunar 28 Jul 2003 17:41:56 -0000 1.3
@@ -1,4 +1,3 @@
-############################################################
# #
# This code is written for Lunar Linux, see #
# http://www.lunar-linux.org #
@@ -20,6 +19,7 @@
# usage : add_priv_user username:groupname [adduseropts [adduseropts]...]
# info : adds username:groupname and passes adduseropts to 'adduser'
function add_priv_user() {
+ debug_msg "function add_priv_user ($@)"
USERNAME=$(echo $1 | cut -d: -f1)
GROUPNAME=$(echo $1 | cut -d: -f2)
Index: view.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/view.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- view.lunar 16 Mar 2003 17:45:11 -0000 1.1
+++ view.lunar 28 Jul 2003 17:41:56 -0000 1.2
@@ -1,4 +1,3 @@
-####################################################################
# #
# display.lunar - functions to view files #
# #
@@ -9,6 +8,7 @@
# usage : view_file FILENAME
# purpose : to view a file
view_file() {
+ debug_msg "view_file ($@)"
if [ -n "$1" ] ; then
# show a file $1
case $(file -b $1 | cut -d' ' -f1) in
More information about the Lunar-commits
mailing list