[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (3b9baf8e32eef0ce6025fe53beee0be64fef904d)

Jaka Kranjc scm at sourcemage.org
Fri Sep 5 16:55:54 EDT 2008


GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:

 ChangeLog                               |    5 +++++
 var/lib/sorcery/modules/libcast         |    3 +--
 var/lib/sorcery/modules/libcrossinstall |    2 +-
 var/lib/sorcery/modules/libdownload     |    3 +--
 var/lib/sorcery/modules/libgrimoire     |    8 +++++++-
 var/lib/sorcery/modules/libmisc         |   14 +++++++-------
 6 files changed, 22 insertions(+), 13 deletions(-)

New commits:
commit 3b9baf8e32eef0ce6025fe53beee0be64fef904d
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libmisc: use message instead of echo, fixed a few typos

commit f4d16e322aa95b4fb78eccc134fce79c48ef65ab
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libgrimoire: fixed install_desktop_files for staging

commit 164009625732156a55652490de6c3c6fbe6f9486
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libdownload: removed an useless nonlocal variable

commit 050d5a7f93cf082f0cf8ac6cdeec5496903b60cb
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libcrossinstall: fixed a help description for install_root_menu

commit 892cd66bf8d35ea0c71f5ee2099903d5ce898aae
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libcast: simplified a check in show_downloading

diff --git a/ChangeLog b/ChangeLog
index 93a37c3..e239f60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
 	  agnostic and single-spaced
 	* sorcery: properly check if the queue is not empty and use spell_ok
 	* common: use spell_ok instead of spell_installed || spell_held
+	* libcast: simplified a check in show_downloading
+	* libcrossinstall: fixed a help description for install_root_menu
+	* libdownload: removed an useless nonlocal variable
+	* libgrimoire: fixed install_desktop_files for staging
+	* libmisc: use message instead of echo, fixed a few typos
 
 2008-09-03 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
 	* libtablet: fixed broken repair file handling - a nonexisting tablet
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 0052ff6..fff5efc 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -716,8 +716,7 @@ function show_downloading()  {
   debug "cast" "Started show_downloading() on $SPELL from $download_log"
 
   # poke around waiting for downloading to start
-  while ! ( [[ $download_log ]] &&
-            [  -e "$download_log"  ] )
+  while ! [[ -e $download_log ]]
   do
     sleep 1
   done
diff --git a/var/lib/sorcery/modules/libcrossinstall b/var/lib/sorcery/modules/libcrossinstall
index 2c3f179..e184e70 100755
--- a/var/lib/sorcery/modules/libcrossinstall
+++ b/var/lib/sorcery/modules/libcrossinstall
@@ -17,7 +17,7 @@
 function install_root_menu() {
 
   debug "libcrossinstall" "cross_install_menu is being built now..."
-  local C_HELP="Fill in your own preferred track root location."
+  local C_HELP="Fill in your own preferred install cache location."
   local I_HELP="Fill in your own preferred install root location."
   local S_HELP="Fill in your own preferred state root location."
   local T_HELP="Fill in your own preferred track root location."
diff --git a/var/lib/sorcery/modules/libdownload b/var/lib/sorcery/modules/libdownload
index 5ee013d..a548acf 100755
--- a/var/lib/sorcery/modules/libdownload
+++ b/var/lib/sorcery/modules/libdownload
@@ -84,8 +84,7 @@ function dl_get_bucket() {
   fi
 
   dl_${handler}_get "$target" "$url_list" "$hints" "$dl_target" "$dl_type"
-  rc=$?
-  if [[ $rc == 0 ]] ; then
+  if [[ $? == 0 ]] ; then
     debug "libdownload" "dl_handler -- downloaded $url"
     eval debug "\$$dl_target \$$dl_type"
     return 0
diff --git a/var/lib/sorcery/modules/libgrimoire b/var/lib/sorcery/modules/libgrimoire
index 85332c5..df16e25 100755
--- a/var/lib/sorcery/modules/libgrimoire
+++ b/var/lib/sorcery/modules/libgrimoire
@@ -166,10 +166,16 @@ function make() {
 function install_desktop_files() {
   debug "libgrimoire" "Running install_desktop_files() on $SPELL"
   local each file
-  local target_dir="/usr/share/applications"
+  local target_dir
   local desktop_dir="$SCRIPT_DIRECTORY/desktop"
   test -d $desktop_dir || return 0
 
+  if [[ $STAGED_INSTALL == off ]]; then
+    target_dir="$INSTALL_ROOT/usr/share/applications"
+  else
+    target_dir="$STAGE_DIRECTORY/TRANSL/usr/share/applications"
+  fi
+
   mkdir -p $target_dir
   for each in $(find $desktop_dir -maxdepth 1 -type f); do
     smgl_basename "$each" file
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 7da2b6d..09d8cff 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -913,7 +913,7 @@ function real_config_query () {
     local ANSWER
     if config_get_option "$1" ANSWER; then
         # option allready ANSWERed in config
-        echo -e "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> ${QUERY_COLOR}$ANSWER${DEFAULT_COLOR} ]]"
+        message "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> ${QUERY_COLOR}$ANSWER${DEFAULT_COLOR} ]]"
 
         # already have a reasonable value...
         [ "$ANSWER" == "y" ] || [ "$ANSWER" == "n" ] && return 0
@@ -961,7 +961,7 @@ function real_config_query_option () {
         list_find "$ANSWER" $5 && key=n
 
         if [[ "$key" ]]; then
-            echo -e "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> ${QUERY_COLOR}$key${DEFAULT_COLOR} ]]"
+            message "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> ${QUERY_COLOR}$key${DEFAULT_COLOR} ]]"
             return 0
         fi
     fi
@@ -998,8 +998,8 @@ function real_config_query_string () {
     local ANSWER
 
     if config_get_option "$1" ANSWER; then
-        # option allready answered in config
-        echo -e "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> '${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
+        # option already answered in config
+        message "[[ ${QUERY_COLOR}$2${DEFAULT_COLOR} -> '${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
     else
         local default
         config_get_last_option "$1" default
@@ -1030,7 +1030,7 @@ function real_config_query_list () {
   shift
 
   if config_get_option "$VARIABLE" ANSWER; then
-    # option allready ANSWERed in config
+    # option already ANSWERed in config
     (
         for foo in "$@"; do
             [ "$foo" == "$ANSWER" ] && exit 0
@@ -1039,7 +1039,7 @@ function real_config_query_list () {
         echo "!!!! stored option '$ANSWER' in config is not in list of provided options !!!!"
         echo "!!!! WARNING !!!!"
     )
-    echo -e "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT_COLOR} -> '${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
+    message "[[ ${QUERY_COLOR}${QUESTION}${DEFAULT_COLOR} -> '${QUERY_COLOR}$ANSWER${DEFAULT_COLOR}' ]]"
   else
     # if there was an answer before, find it
     local default default_num=0 foo
@@ -1296,7 +1296,7 @@ function complain_sorcery_var() {
   message "THIS VARIABLE IS A USED BY SORCERY, THIS IS PROBABLY" \
           "A SPELL BUG\nAND SORCERY MAY BEHAVE IN UNDEFINED WAYS IF" \
           "YOU CONTINUE."
-  message "\n\nPLEASE REPORT A BUG IMMEDIATLY!!${DEFAULT_COLOR}\n\n"
+  message "\n\nPLEASE REPORT A BUG IMMEDIATELY!!${DEFAULT_COLOR}\n\n"
 }
 
 #-------------------------------------------------------------------



More information about the SM-Commit mailing list