CVS: theedge/var/lib/lunar/functions check.lunar, 1.7,
1.8 edit.lunar, 1.8, 1.9 install.lunar, 1.17,
1.18 locking.lunar, 1.5, 1.6 modules.lunar, 1.25,
1.26 sizes.lunar, 1.5, 1.6 temp.lunar, 1.4, 1.5 tracking.lunar,
1.8, 1.9
elaine at lunar-linux.org
elaine at lunar-linux.org
Thu Sep 11 05:09:53 GMT 2003
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv4895/var/lib/lunar/functions
Modified Files:
check.lunar edit.lunar install.lunar locking.lunar
modules.lunar sizes.lunar temp.lunar tracking.lunar
Log Message:
Initial versioning support for lunar, where versions are either
version-aware modules or subdirectories of the primary module.
Index: check.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/check.lunar,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- check.lunar 14 Aug 2003 19:57:25 -0000 1.7
+++ check.lunar 11 Sep 2003 05:09:50 -0000 1.8
@@ -258,11 +258,12 @@
# here starts the real work:
MODULE=$1
+ mv_edit $MODULE
# base vars needed to execute DEPENDS
SECTION=$(find_section $MODULE)
SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
- MODULE_CONFIG=$DEPENDS_CONFIG/$MODULE
+ MODULE_CONFIG=$DEPENDS_CONFIG/$MOD_V_SNAME
# reroute depends output to our private files:
OLD_DEPENDS_STATUS=$DEPENDS_STATUS
Index: edit.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/edit.lunar,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- edit.lunar 4 Aug 2003 23:19:42 -0000 1.8
+++ edit.lunar 11 Sep 2003 05:09:50 -0000 1.9
@@ -79,3 +79,10 @@
}
+# function : mv_edit
+# usage : mv_edit $VARIABLE
+# purpose : creates a 'safe' value in variable "$MOD_V_SNAME"
+mv_edit() {
+ MOD_V_SNAME=$(echo $1 | sed 's:/:.:g')
+ return 0
+}
Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/install.lunar,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- install.lunar 14 Aug 2003 20:25:49 -0000 1.17
+++ install.lunar 11 Sep 2003 05:09:50 -0000 1.18
@@ -124,11 +124,12 @@
stop_logging() {
debug_msg "stop_logging ($@)"
+ mv_edit $MODULE
message "${MESSAGE_COLOR}Creating" \
- "${FILE_COLOR}$COMPILE_LOGS/$MODULE-$VERSION.bz2" \
+ "${FILE_COLOR}$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2" \
"${DEFAULT_COLOR}"
- bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MODULE-$VERSION.bz2
+ bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2
temp_destroy $C_LOG
temp_destroy $C_FIFO
}
@@ -136,8 +137,9 @@
start_logging () {
debug_msg "start_logging ($@)"
- export C_LOG=$(temp_create "${MODULE}.compile-log")
- export C_FIFO=$(temp_create "${MODULE}.compile-fifo")
+ mv_edit $MODULE
+ export C_LOG=$(temp_create "${MOD_V_SNAME}.compile-log")
+ export C_FIFO=$(temp_create "${MOD_V_SNAME}.compile-fifo")
# just remaking this as FIFO
rm -f $C_FIFO
@@ -358,7 +360,8 @@
export INSTALLWATCHFILE=$(temp_create "$MODULE.installwatch")
# lock the module for installation, check for moonbase call
- linING="/var/lock/installing.$MODULE"
+ mv_edit $MODULE
+ linING="/var/lock/installing.$MOD_V_SNAME"
if [ "$MODULE" == "moonbase" ] ; then
if ! current_locked && ! solo_locked ; then
echo $$ > $linING &&
@@ -410,7 +413,7 @@
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
return 1
fi
@@ -431,13 +434,13 @@
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during $LIN_ERROR"
return 1
fi
rm_source_dir &&
- report $INSTALL_LOGS/$MODULE-$VERSION "install log" $MODULE $VERSION &&
+ report $INSTALL_LOGS/$MOD_V_SNAME-$VERSION "install log" $MODULE $VERSION &&
rm -f $linING &&
sound SUCCESS &&
activity_log "lin" "$MODULE" "$VERSION" "success"
@@ -446,7 +449,7 @@
sound FAILURE
message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
rm -f $linING
- report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
+ report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
activity_log "lin" "$MODULE" "$VERSION" "failed" "Due to build errors during or after $LIN_ERROR"
return 1
fi
Index: locking.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/locking.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- locking.lunar 4 Aug 2003 23:19:42 -0000 1.5
+++ locking.lunar 11 Sep 2003 05:09:50 -0000 1.6
@@ -20,6 +20,7 @@
# usage : lock_file <absolute file name>
# purpose : locks a file or wait until. Better use as lock_file <file> && || etc
function lock_file() {
+ debug_msg "lock_file ($@)"
function file_lock() {
#locking is disabled if ln or rm not found!!
[ -x "/bin/ln" ] || return 0
@@ -27,6 +28,7 @@
TEMPFILE="$1.$$"
LOCKFILE="$1.lock"
+
echo $$ > $TEMPFILE 2>/dev/null ||
{
message "${PROBLEM_COLOR}You don't have permission to access" \
@@ -70,6 +72,7 @@
# usage : unlock_file <absolute file name>
# purpose : unlocks a file
function unlock_file() {
+ debug_msg "unlock_file ($@)"
#unlocking is disabled if rm not found!!
[ -x "/bin/rm" ] || return 0
rm -f $1.lock 2>/dev/null && return 0
Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/modules.lunar,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- modules.lunar 4 Aug 2003 23:19:42 -0000 1.25
+++ modules.lunar 11 Sep 2003 05:09:50 -0000 1.26
@@ -58,10 +58,12 @@
exit 1
fi
- for MODULE in $(ls $MOONBASE/$1 2>/dev/null | \
+ for MODULE in $(( ls $MOONBASE/$1 && ls -d $MOONBASE/$1/*/[0-9]* |
+ sed "s:$MOONBASE/$1/::" ) 2>/dev/null | \
grep -v -e "ChangeLog" -e "CVS" -e "COPYING" -e "LICENSE" -e "README")
do
echo "$MODULE"
+ debug_msg "XXXX Module=$MODULE"
done
return 0
}
@@ -198,7 +200,8 @@
SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
run_module_file $1 DETAILS &> /dev/null &&
SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
- MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$1}
+ mv_edit $1
+ MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MOD_V_SNAME}
return 0
fi
Index: sizes.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sizes.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- sizes.lunar 4 Aug 2003 23:19:42 -0000 1.5
+++ sizes.lunar 11 Sep 2003 05:09:50 -0000 1.6
@@ -21,6 +21,7 @@
# purpose : finds the installed size of module in KB
find_module_size() {
#this functions checks the modules file if there is already size entry
+ mv_edit $1
module_size()
{
unset SIZE
@@ -40,14 +41,14 @@
module_size $1 $VERSION && return
# no :( lets dig through logs
- [ -e "$INSTALL_LOGS/$1-$VERSION" ] &&
+ [ -e "$INSTALL_LOGS/$MOD_V_SNAME-$VERSION" ] &&
while read LINE
do
[ -f "$LINE" ] &&
SIZE0=`du "$LINE" |
cut -f 1-1` &&
SIZE=$((SIZE0+SIZE))
- done <$INSTALL_LOGS/$1-$VERSION &&
+ done <$INSTALL_LOGS/$MOD_V_SNAME-$VERSION &&
echo ${SIZE}KB ||
message "${PROBLEM_COLOR}Install log for $1 is not found${DEFAULT_COLOR}"
}
Index: temp.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/temp.lunar,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- temp.lunar 29 Jul 2003 20:49:28 -0000 1.4
+++ temp.lunar 11 Sep 2003 05:09:50 -0000 1.5
@@ -20,8 +20,9 @@
temp_create() {
debug_msg "temp_create ($@)"
TMPDIR=${TMPDIR:-/var/tmp}
-
- if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$1.XXXXXXXXXX ) ; then
+ mv_edit $1
+ TMPFILE=$MOD_V_SNAME
+ if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
echo $TMPFILE
else
message "${PROBLEM_COLOR}ERROR:${NORMAL_COLOR}${DEFAULT_COLOR}" \
Index: tracking.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/tracking.lunar,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- tracking.lunar 4 Aug 2003 23:19:42 -0000 1.8
+++ tracking.lunar 11 Sep 2003 05:09:50 -0000 1.9
@@ -68,10 +68,12 @@
# usage : create_install_log
# purpose : create an install log
create_install_log() {
+
debug_msg "create_install_log ($@)"
+ mv_edit $MODULE
TMP_INST_LOG=$(temp_create "install-log")
- INST_LOG="$INSTALL_LOGS/$MODULE-$VERSION"
+ INST_LOG="$INSTALL_LOGS/$MOD_V_SNAME-$VERSION"
rm -f $INST_LOG &> /dev/null
message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
@@ -85,9 +87,9 @@
filter "$LOCAL_EXCLUDED" |
exists > $TMP_INST_LOG
- echo "$INSTALL_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
- echo "$COMPILE_LOGS/$MODULE-$VERSION.bz2" >> $TMP_INST_LOG
- echo "$MD5SUM_LOGS/$MODULE-$VERSION" >> $TMP_INST_LOG
+ echo "$INSTALL_LOGS/$MOD_V_SNAME-$VERSION" >> $TMP_INST_LOG
+ echo "$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2" >> $TMP_INST_LOG
+ echo "$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION" >> $TMP_INST_LOG
MISOWNED_SYMLINKS=$(syms_not_owned $TMP_INST_LOG
echo -n "/dev/null")
@@ -104,26 +106,28 @@
create_md5sum_log() {
debug_msg "create_md5sum_log ($@)"
+ mv_edit $MODULE
- rm -f $MD5SUM_LOGS/$MODULE-$VERSION &> /dev/null
+ rm -f $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION &> /dev/null
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MODULE-$VERSION${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION${DEFAULT_COLOR}"
- files < $INSTALL_LOGS/$MODULE-$VERSION | while read FILE ; do
- md5sum $FILE >> $MD5SUM_LOGS/$MODULE-$VERSION
+ files < $INSTALL_LOGS/$MOD_V_SNAME-$VERSION | while read FILE ; do
+ md5sum $FILE >> $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION
done
}
create_install_cache() {
debug_msg "create_install_cache($@)"
+ mv_edit $MODULE
if [ "$ARCHIVE" == "off" ] ; then
return
fi
- message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
- tar cPjf "$INSTALL_CACHE/$MODULE-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MODULE-$VERSION
+ message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
+ tar cPjf "$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MOD_V_SNAME-$VERSION
}
More information about the Lunar-commits
mailing list