Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f38fec3507a1240effa5573f62058dd35a184647)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f38fec3507a1240effa5573f62058dd35a184647)
  • Date: Mon, 28 Jan 2008 16:10:22 -0600

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

ChangeLog | 10 ++++++++++
usr/sbin/cast | 25 ++++++++++++++++++++++---
usr/sbin/confmeld | 17 +++++++++--------
var/lib/sorcery/modules/build_api/common | 12 ++++++++----
var/lib/sorcery/modules/libresurrect | 4 ++--
5 files changed, 51 insertions(+), 17 deletions(-)

New commits:
commit f38fec3507a1240effa5573f62058dd35a184647
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libressurect:
fixed staged install check in internal_install_config_file !="off"
also
matches the empty string, which currently happens when ressurecting
(cherry picked from commit db8846c06d3610e7f173c2a42db0858f450fd96d)

commit f8425741b6dc602302be94ef39833d2574a03d9a
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libressurect: internal_install_config_file expects a md5 log in root form
(cherry picked from commit 1d44aa065f16587a8428d5d051fc6bce920dd377)

commit 1c2312eba52f2c22f70a4a3e857452f1d198b4ee
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

common: don't save empty staged config chapters
(cherry picked from commit 03952f5042d6ef0b66c882a184cfcdf8afc41be6)

commit 28d3f9d0b9ab68bc3e9018cf64671f744b9b3e32
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

confmeld: remove all empty dirs in the config staging area (cast is
leaving them behind)
(cherry picked from commit 956bb664f6b94863ee74c79882ff506b15444f75)

commit 16884887cad992e812dc647fdf18cb9da6a1498a
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

confmeld: removed EOL whitespace
(cherry picked from commit 2688adda2f8239f94a1e52a1a688bf1a6c5e813e)

commit 746ebd8faffc2ec88e90721a24d889521b811144
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

cast: suggest the user to run confmeld if there are any deferred files.
fixes the second third of #13618
(cherry picked from commit 680e3228e05065d0bf7eeffcd2a15141228cdd55)

diff --git a/ChangeLog b/ChangeLog
index 215fdfc..8a3429f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-28 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cast: suggest the user to run confmeld if there are any deferred
files.
+ fixes the second third of #13618
+ * confmeld: remove all empty dirs in the config staging area (cast is
+ leaving them behind)
+ * common: don't save empty staged config chapters
+ * libressurect: internal_install_config_file expects a md5 log in
root form
+ fixed staged install check in internal_install_config_file !="off"
also
+ matches the empty string, which currently happens when ressurecting
+
2008-01-27 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libstate: fixed query_spell_status to be regression free
(was breaking on "spells" with slashes in their names - in gaze)
diff --git a/usr/sbin/cast b/usr/sbin/cast
index d1b1882..a321473 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -606,6 +606,7 @@ function pass_four() {
function pass_five() {

debug "cast" "Function : pass_five"
+ local rc=0

# must exist or we get problems with checks here.
touch $SUCCESS_LIST
@@ -694,7 +695,7 @@ function pass_five() {

set_term_title "Casting failed."
message "${DEFAULT_COLOR}"
- return 1
+ rc=1

fi

@@ -707,11 +708,29 @@ function pass_five() {
message "$item"
done | column
message "${DEFAULT_COLOR}"
- return 1
+ rc=1
fi
fi
- debug "cast" "End of pass_five"

+ # check if confmeld should be run
+ local spell deferred_list
+ while read spell; do
+ # ignore the date - previously deferred files should be merged too
+ if [[ -d $CONFIG_STAGE_DIRECTORY/$spell ]]; then
+ deferred_list="$spell $deferred_list"
+ fi
+ done < $SUCCESS_LIST
+ if [[ $deferred_list ]]; then
+ message "${MESSAGE_COLOR}Cast deferred installing some configuration
files."
+ message "The following spells have pending updates: "
+ message "---------------------------------$SPELL_COLOR"
+ message "$deferred_list" | column
+ message "${MESSAGE_COLOR}Please run confmeld to merge them into your
system."
+ message "$DEFAULT_COLOR"
+ fi
+
+ debug "cast" "End of pass_five"
+ return $rc
}

#---------------------------------------------------------------------
diff --git a/usr/sbin/confmeld b/usr/sbin/confmeld
index 9c479b8..68a5bfd 100755
--- a/usr/sbin/confmeld
+++ b/usr/sbin/confmeld
@@ -26,7 +26,7 @@ EOF

#--------------------------------------------------------------------
## List all the configs in the config stage root
-##
+##
## @stdout a list of all configs in the config stage root
#--------------------------------------------------------------------
function all_config_files()
@@ -96,16 +96,16 @@ function process_parameters()

#--------------------------------------------------------------------
## Main
-##
+##
## No real arguments get all the config files and start installing
## them to the system using install_config_file
#--------------------------------------------------------------------
function main()
{
- local target spell sdate
+ local target spell sdate
local last_spell=""
local last_sdate=""
-
+
process_parameters "$@"

for file in $(all_config_files)
@@ -118,11 +118,11 @@ function main()
tablet_set_spell $spell &&
install_config_file $file $INSTALL_ROOT/$target
#
- # since we use find we need to remove empty directories
- # so if the spell or the date changes then we remove the directory so
+ # since we use find we need to remove empty directories
+ # so if the spell or the date changes then we remove the directory so
# CONFIG_STAGE_DIRECTORY should always be empty after you complete the
# call to confmeld
- #
+ #
# find does a preorder traversal of the directory tree keeping the path
# (esentially a stack) of where its been in the tree. If a particular
date
# or spell name changes at the same level in the tree we can safely
assume
@@ -149,9 +149,10 @@ function main()
#
if [[ $last_spell ]]
then
- message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell
fi
+ find $CONFIG_STAGE_DIRECTORY -mindepth 1 -maxdepth 2 -type d -empty -delete
}


diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index 3903ae1..f7ea19c 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -288,11 +288,15 @@ function run_spell_success() {
message "${MESSAGE_COLOR}Creating tablet in directory" \
"${FILE_COLOR}${tablet_dir}${DEFAULT_COLOR}"
tablet_install_spell_files $tablet_dir
- local TABLET_SPELL_DIR=$tablet_dir
- if [[ $STAGED_INSTALL != "off" && -d
$CONFIG_STAGE_DIRECTORY/$SPELL/current ]]
+ local TABLET_SPELL_DIR=$tablet_dir spell_config_stage
+ spell_config_stage=$CONFIG_STAGE_DIRECTORY/$SPELL
+ if [[ $STAGED_INSTALL != "off" && -d $spell_config_stage/current ]]
then
- mv $CONFIG_STAGE_DIRECTORY/$SPELL/current \
- $CONFIG_STAGE_DIRECTORY/$SPELL/$(basename $tablet_dir)
+ if ! rmdir $spell_config_stage/current $spell_config_stage
2>/dev/null;
+ then
+ mv $spell_config_stage/current \
+ $spell_config_stage/$(basename $tablet_dir)
+ fi
fi
# this data is now doubly stale, remove it
rm -f $ABANDONED_PERSIST/$SPELL.p
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index e6ad761..cfb2c9a 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -347,7 +347,7 @@ function resurrect_sub() {
debug libresurrect "resurrect_install_conf_sub -- $@"
test -d ".$1" ||
internal_install_config_file ".$1" "${INSTALL_ROOT}${1}" $savetime \
- "$OLD_MD5_LOG" || {
+ "$OLD_MD5_LOG_R" ||
{
res_fail=1
BREAK=1
}
@@ -452,7 +452,7 @@ function internal_install_config_file() {
fi

# if the file does not exist, or stage root is invoked
- if ! test -e "$to" || [[ "$STAGED_INSTALL" != "off" ]] ; then
+ if ! test -e "$to" || [[ $STAGED_INSTALL == on ]] ; then
# copy the new one in (plus leading directories)
mkdir -p "$(dirname "$to")" &&
cp -pv "$from" "$to"



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f38fec3507a1240effa5573f62058dd35a184647), Jaka Kranjc, 01/28/2008

Archive powered by MHonArc 2.6.24.

Top of Page