[Lunar-commits] r19128 - lunar/trunk/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Sun Mar 5 21:42:45 UTC 2006
Author: sofar
Date: 2006-03-05 21:42:41 +0000 (Sun, 05 Mar 2006)
New Revision: 19128
Modified:
lunar/trunk/var/lib/lunar/functions/check.lunar
lunar/trunk/var/lib/lunar/functions/updatelog.lunar
Log:
Allow 'lunar fix' to display a report whether fixes were succesfull or not.
Modified: lunar/trunk/var/lib/lunar/functions/check.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/check.lunar 2006-03-05 21:05:08 UTC (rev 19127)
+++ lunar/trunk/var/lib/lunar/functions/check.lunar 2006-03-05 21:42:41 UTC (rev 19128)
@@ -109,24 +109,34 @@
MODULES=$(list_installed | grep -v moonbase)
fi
+ if [[ -n "$FIXDEPENDS" ]] ; then
+ for MODULE in $MODULES ; do
+ fix_depends $MODULE
+ done
+ return
+ fi
+
+ # discover BROKEN modules
+ for MODULE in $MODULES ; do
+ if ! run_checks $MODULE ; then
+ BROKEN_MODULES=( ${BROKEN_MODULES[@]} $MODULE )
+ fi
+ done
+
+ # if we were called with --fixdepends then we may skip the rest
+ if [ -n "$FIXDEPENDS" ] ; then
+ return
+ fi
+
export TMP_LIN_SUCCESS=$(temp_create "successful")
export TMP_LIN_FAIL=$(temp_create "failed")
- for MODULE in $MODULES ; do
- # ENV separation required here!
+ for MODULE in $(sort_by_dependency ${BROKEN_MODULES[@]}) ; do
(
run_details $MODULE &&
- fix_depends $MODULE &&
-
- # if we were called with --fixdepends then we may skip the rest
- if [ -n "$FIXDEPENDS" ] ; then
- continue
- fi
-
if module_installed $MODULE && ! module_held $MODULE ; then
-
if ! run_checks $MODULE ; then
- if [ -n "$NOFIX" ] ; then
+ if [[ -n "$NOFIX" ]] ; then
continue
fi
NEVER_ASK=1 DEPS_ONLY= satisfy_depends &&
Modified: lunar/trunk/var/lib/lunar/functions/updatelog.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/updatelog.lunar 2006-03-05 21:05:08 UTC (rev 19127)
+++ lunar/trunk/var/lib/lunar/functions/updatelog.lunar 2006-03-05 21:42:41 UTC (rev 19128)
@@ -37,13 +37,13 @@
local NUMSUCCESS NUMFAILURES
debug_msg "display_success_info ($@)"
- NUMSUCCESS=$(cat $TMP_LIN_SUCCESS | wc -l)
- NUMFAILURES=$(cat $TMP_LIN_FAIL | wc -l)
+ NUMSUCCESS=$(wc -l $TMP_LIN_SUCCESS | cut -d" " -f1)
+ NUMFAILURES=$(wc -l $TMP_LIN_FAIL | cut -d" " -f1)
message
message "${MESSAGE_COLOR}Lunar $1 completed at `date`${DEFAULT_COLOR}"
- message "Successful : " $NUMSUCCESS
- message "Failed : " $NUMFAILURES
+ message "Successful : $NUMSUCCESS"
+ message "Failed : $NUMFAILURES"
message
if [ "$NUMSUCCESS" -gt "0" ]; then
More information about the Lunar-commits
mailing list