Skip to Content.
Sympa Menu

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

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 (3bb8ef5e9f5474fc29ead1b48f44800d7f48c338)
  • Date: Tue, 26 Feb 2008 09:09:43 -0600

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

ChangeLog | 3 +++
var/lib/sorcery/modules/libdispel | 11 +++++++++++
var/lib/sorcery/modules/libstage | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)

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

libdispel: remove any config stages upon dispel
libstage: improved a comment

diff --git a/ChangeLog b/ChangeLog
index 0d94ac1..20a9c8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-02-25 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libdispel: remove any config stages upon dispel
+
2008-02-23 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcast: remove the castfs log after it is copied to the system -
the logs
are big and can clog up /tmp (especially for tmpfs users).
Previously
diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index 32d2bf0..5f73918 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -75,6 +75,16 @@ function reap_modified_file() {
}

#---------------------------------------------------------------------
+## Removes spell config stages if there are any
+#---------------------------------------------------------------------
+function reap_spell_config_stage() {
+ lock_file "$CONFIG_STAGE_DIRECTORY/$SPELL"
+ # it's locked - we also don't have to care about the unlikely "current"
stage
+ rm -fr "$CONFIG_STAGE_DIRECTORY/$SPELL"
+ unlock_file "$CONFIG_STAGE_DIRECTORY/$SPELL"
+}
+
+#---------------------------------------------------------------------
## Removes depends entries for what the spell depends on
#---------------------------------------------------------------------
function reap_depends() {
@@ -323,6 +333,7 @@ function dispel_spell() {
reaper $INST_LOG $MD5_LOG &&
post_remove &&
reap_state_files $INST_LOG &&
+ reap_spell_config_stage &&
remove_spell $SPELL &&
{ [[ $TRIGGER == off ]] || trigger "dispel";} &&
remove_triggers $SPELL &&
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
index 5166068..955fec0 100755
--- a/var/lib/sorcery/modules/libstage
+++ b/var/lib/sorcery/modules/libstage
@@ -247,7 +247,8 @@ function recursive_config_stage_cleanup()
local spell=$2

smgl_dirname "$file" dirname
- dirname="${dirname#$CONFIG_STAGE_DIRECTORY/}" #make it a relative path
+ # make it a relative path for rmdir -p
+ dirname="${dirname#$CONFIG_STAGE_DIRECTORY/}"

# lock_file works on dirs too
lock_file "$CONFIG_STAGE_DIRECTORY/$spell"



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (3bb8ef5e9f5474fc29ead1b48f44800d7f48c338), Jaka Kranjc, 02/26/2008

Archive powered by MHonArc 2.6.24.

Top of Page