[SM-Commit] GIT changes to stable-1.14 sorcery by Jaka Kranjc (7c2f1ebc4973794cd7bb2925d0b1f33f80d8a73a)

Jaka Kranjc scm at sourcemage.org
Wed Oct 14 04:49:11 EDT 2009


GIT changes to stable-1.14 sorcery by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:

 ChangeLog                                         |   53 ++++++++++++
 etc/sorcery/config                                |    3 
 etc/sorcery/url                                   |    8 -
 etc/sorcery/version                               |    2 
 usr/sbin/delve                                    |    2 
 usr/share/man/man8/delve.8                        |   95 ++++++++++++++++++++++
 var/lib/sorcery/modules/dl_handlers/dl_git        |   27 ++++--
 var/lib/sorcery/modules/dl_handlers/dl_svn        |   10 +-
 var/lib/sorcery/modules/dl_handlers/dl_wget       |    2 
 var/lib/sorcery/modules/libcast                   |    2 
 var/lib/sorcery/modules/libdepends                |    2 
 var/lib/sorcery/modules/libmisc                   |   20 ++--
 var/lib/sorcery/modules/libresurrect              |   14 +--
 var/lib/sorcery/modules/libtrack                  |    5 -
 var/lib/sorcery/modules/libtriggers               |   14 +++
 var/lib/sorcery/modules/url_handlers/url_git      |    4 
 var/lib/sorcery/modules/url_handlers/url_git_http |    4 
 var/lib/sorcery/sustained                         |    1 
 18 files changed, 220 insertions(+), 48 deletions(-)

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

    1.14.4-rc3

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

    sustained: removed texinfo #15374

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

    dl_wget, dl_aria2: rename the download to the expected name #15097
    
    (cherry-picked from commit c8509002ac04facf4629d0f9b26620a21d187ee0)

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

    libdepends: fixed real_show_up_depends regression #15357

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

    libtriggers: added real_on_pre_cast #15352

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

    libmisc: mk_tmp_dirs now works also for nonroot-but-uid0 users, patch
              by ruskie #15269

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

    config: made BUILD_DIRECTORY ignore INSTALL_ROOT and user changeable,
              modified patch by eekee #15234

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

    libcast, libtriggers: made conflicts and triggers unsustaining #15226
    aka another way for the spellwright to damage a system :)
    
    (cherry-picked from commit b38df46514e1ca8500b8bdd5b1353220a74cbcae)

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

    libtrack: made real_track_manual work with whitespace and optimised
              it #15240, patch by chp

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

    1.14.4-rc2

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

    libresurrect: fixed installing of spell files from user owned       grimoires #14576
    
    (cherry-picked from commit 760f7d435e592d03de0e3e409f7363a25f19cce0)

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

    dl_git: fixed syntax error
    (cherry picked from commit be9f43eccd3f3ae78b63b02784eabf6f964107df)

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

    1.14.4-rc1

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

    delve.8: added delve manpage based on the draft in #15094 by Donald
              Johnson

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

    dl_git: updated for newer git, initial patch from Andraž Levstik #15208

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

    url_*: fixed url_verify_* to not break on empty optional parameters
    
    (cherry-picked from commit d8083d4b6d3848d053a2cd72ff6dd21b673865c7)

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

    dl_svn: check the prefix of the correct url

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

    dl_svn: support the no-check-certificate source hint #15045

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

    dl_svn: don't pass --no-interactive twice or never in some cases

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

    libdepends: fixed show_up_depends not printing matches that are also
              providers

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

    delve: fixed typo in help

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

    url: removed dead fallback urls
    
    (cherry-picked from commit ab7fa5721935cec96561dba944fc7dd0c9179b06)

diff --git a/ChangeLog b/ChangeLog
index fc33eed..9f42d98 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,59 @@
+2009-08-29 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* sustained: removed texinfo #15374
+
+2009-08-29 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* libdepends: fixed real_show_up_depends regression #15357
+	* dl_wget: rename the download to the expected name #15097
+
+2009-08-29 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* libtriggers: added real_on_pre_cast #15352
+
+2009-07-19 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* libmisc: mk_tmp_dirs now works also for nonroot-but-uid0 users, patch
+	  by ruskie #15269
+
+2009-07-19 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* config: made BUILD_DIRECTORY ignore INSTALL_ROOT and user changeable,
+	  modified patch by eekee #15234
+
+2009-05-27 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* libtrack: made real_track_manual work with whitespace and optimised
+	  it #15240, patch by chp
+	* libcast, libtriggers: made conflicts and triggers unsustaining #15226
+
+2009-05-27 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* dl_git: fixed syntax error
+	* libresurrect: fixed installing of spell files from user owned
+	  grimoires #14576
+
 2009-05-26 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
 	* version: 1.14.3 released
 
+2009-05-26 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* delve.8: added delve manpage based on the draft in #15094 by Donald
+	  Johnson
+
+2009-05-12 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* url_*: fixed url_verify_* to not break on empty optional parameters
+	* dl_git: updated for newer git, initial patch from Andraž Levstik #15208
+
+2009-04-22 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* dl_svn: check the prefix of the correct url
+
+2009-04-21 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* dl_svn: don't pass --no-interactive twice or never in some cases
+	  support the no-check-certificate source hint #15045
+
+2009-04-20 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* libdepends: fixed show_up_depends not printing matches that are also
+	  providers
+
+2009-03-03 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* delve: fixed typo in help
+
+2009-02-23 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* url: removed dead fallback urls
+
 2008-12-29 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
 	* libtrack: avoid an installwatch issue in create_install_log #14835
 
diff --git a/etc/sorcery/config b/etc/sorcery/config
index db1fdb4..6e75585 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -174,7 +174,8 @@ PROGRESS_SPINNER_CHARS='-\|/'
 
 [  -r  $GRIMOIRE_LIST  ]  &&  .  $GRIMOIRE_LIST
 
-      BUILD_DIRECTORY=${INSTALL_ROOT}/usr/src
+      # no $INSTALL_ROOT, so it stays consistent through INSTALL #15234
+      BUILD_DIRECTORY=${BUILD_DIRECTORY:-/usr/src}
    DOCUMENT_DIRECTORY=${INSTALL_ROOT}/usr/share/doc
 CONFIG_STAGE_DIRECTORY=${STATE_ROOT}/var/state/sorcery/staged_configs
 
diff --git a/etc/sorcery/url b/etc/sorcery/url
index 1121fb7..a67f6be 100755
--- a/etc/sorcery/url
+++ b/etc/sorcery/url
@@ -11,11 +11,9 @@
                #
                # Set FURLNUM to nr. of fallback urls.
                #
-               FURLNUM=4
-FALLBACK_URL_MIRROR[0]=http://smgl.positivism.org
-FALLBACK_URL_MIRROR[1]=ftp://thefrayedknot.armory.com/sorcery
-FALLBACK_URL_MIRROR[2]=http://download.sourcemage.org/mirror
-FALLBACK_URL_MIRROR[3]=http://shlrm.org/sourcemage
+               FURLNUM=2
+FALLBACK_URL_MIRROR[0]=http://download.sourcemage.org/mirror
+FALLBACK_URL_MIRROR[1]=http://shlrm.org/sourcemage
 
       # specify default fallback url.
       LEAPFORWARD_URL=${LEAPFORWARD_URL:=""}
diff --git a/etc/sorcery/version b/etc/sorcery/version
index 4ea8ad8..4e00d0a 100644
--- a/etc/sorcery/version
+++ b/etc/sorcery/version
@@ -1 +1 @@
-1.14.3
+1.14.4
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 9598b9d..a1dd429 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -26,7 +26,7 @@ delve spellname SPELL_FILE [... SPELL_FILE]
 delve spellname success|failure
 delve spellname all
 
-Paramters
+Parameters
 
 -f | --force                    Continue running files even if one fails
                                 (use with caution!)
diff --git a/usr/share/man/man8/delve.8 b/usr/share/man/man8/delve.8
new file mode 100755
index 0000000..8175001
--- /dev/null
+++ b/usr/share/man/man8/delve.8
@@ -0,0 +1,95 @@
+.TH DELVE "8" "MAY 2009" "Source Mage GNU Linux" "System Administration"
+.SH NAME
+delve \- a tool that allows the running of single spell files through the
+build and install phases of the casting process.
+.SH SYNOPSIS
+.B delve
+.RB [ \-f ]
+.IR spellname\ SPELL_FILE
+.RI [ ...\ SPELL_FILE ]
+
+.B delve
+.IR spellname \ success|failure
+
+.BI delve \ spellname 
+.R all
+
+.B delve [\-f] \-c
+.I start end spellname
+.SH DESCRIPTION
+.I delve
+.R is a low level tool that normally should not be used as it can harm your
+system when done improperly. It allows the running and stepping through
+single spell build and install files that cast runs continuously.
+
+But it is useful in some instances, such as resuming failed builds,
+circumventing dependency requirements or for custom package builds. For
+example, one could type
+.B delve -c start config_loc spellname 
+.R do some changes to the source, compile the spell manually and then continue off with
+.B delve -c PRE_INSTALL end 
+.BR spellname .
+.R Please do not complain if your system breaks after using this.
+
+When one needs to do something special, they should consider if that change
+can be useful to others and file a bug report if that is so.
+
+.SS SPELL STATES
+.B spell states
+.R are stages in which a spell carries out certain actions. For example,
+.B PRE_BUILD
+.R will unpack and verify the sources of the spell.
+
+The spell states go, in order of precedency by API:
+
+.B API1=
+.R \*(lqstart PRE_BUILD config_loc BUILD POST_BUILD POST_INSTALL TRIGGERS end\*(rq
+
+.B API2=
+.R \*(lqstart PRE_BUILD config_loc BUILD PRE_INSTALL INSTALL INSTALL_EXTRAS POST_INSTALL TRANSFER FINAL TRIGGERS end\*(rq
+
+.R API2 is the default API. Consult
+.BR grimoire (5)
+.R for more information on the spell states.
+
+.SS NON-FILE STATES
+.B start
+.R is an empty state that will always go onto the next spell state.
+
+.B config_loc
+.R is a state which will ask if one wants to add custom
+.B ./configure
+.R flags only if
+.B CONFIG_LOC
+.R is enabled in the Sorcery Features menu and the source uses configure,
+otherwise it is an empty state.
+
+.BR success \ and \ failure
+.R are substates of end.
+
+.B end
+.R runs success if all the run states were successful, otherwise
+failure (internal sorcery functions).
+.PP
+.SH OPTIONS
+\-f,\-\-force
+.RS
+.R Continue to run all files even if one fails
+.RE
+\-c, \-\-continue
+.I start end
+.RS
+Run all files from the start step to the end step.
+.SH AUTHOR
+Written by Donald Johnson.
+
+Maintained by the Source Mage GNU Linux Team (http://www.sourcemage.org/).
+.SH REPORTING BUGS
+Report bugs to bugzilla <http://bugs.sourcemage.org/>.
+.SH SEE ALSO
+.BR cast (8),
+.BR sorcery (8),
+.BR alter (8),
+.BR grimoire (5)
+.SH WARRANTY
+This is free software with ABSOLUTELY NO WARRANTY.
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_git b/var/lib/sorcery/modules/dl_handlers/dl_git
index e3ddd24..95546b5 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_git
+++ b/var/lib/sorcery/modules/dl_handlers/dl_git
@@ -43,10 +43,21 @@ function dl_git_get () {
     if test -d $GIT_DIRECTORY; then
       message "${MESSAGE_COLOR}Running git pull...${DEFAULT_COLOR}"
       ( cd $GIT_DIRECTORY &&
-      echo git checkout $GIT_TAG &&
-      git checkout $GIT_TAG &&
-      echo git pull $GIT_ROOT $GIT_TAG &&
-      git pull $GIT_ROOT $GIT_TAG )
+      match=$(git branch | grep -F " $GIT_TAG"; true) &&
+      if [[ $match ]]; then
+        # no need to checkout a branch if we're already on it
+        if [[ ${match:0:1} != '*' ]]; then
+          echo git checkout $GIT_TAG &&
+          git checkout $GIT_TAG
+        else
+          : # already on the correct branch
+        fi
+      else
+        echo git checkout -b $GIT_TAG origin/$GIT_TAG &&
+        git checkout -b $GIT_TAG origin/$GIT_TAG
+      fi
+      echo git pull &&
+      git pull )
       rc=$?
       eval "$dl_target=\"$GIT_DIRECTORY\""
     else
@@ -54,10 +65,12 @@ function dl_git_get () {
       echo git clone $GIT_ROOT $GIT_DIRECTORY
       git clone $GIT_ROOT $GIT_DIRECTORY &&
       cd $GIT_DIRECTORY &&
-      echo git checkout $GIT_TAG &&
-      git checkout $GIT_TAG &&
-      cd ../
+      if ! git branch | grep -qF " $GIT_TAG"; then
+        echo git checkout -b $GIT_TAG origin/$GIT_TAG &&
+        git checkout -b $GIT_TAG origin/$GIT_TAG
+      fi
       rc=$?
+      cd ../
       eval "$dl_target=\"$GIT_DIRECTORY\""
     fi
     [[ $rc == 0 ]] && break
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_svn b/var/lib/sorcery/modules/dl_handlers/dl_svn
index cd71806..4f6471c 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_svn
+++ b/var/lib/sorcery/modules/dl_handlers/dl_svn
@@ -43,13 +43,17 @@ function dl_svn_get () {
       local SVN_ROOT=$(echo $SVN_ROOT|sed 's#//\(.*\)@#//#')
       local USER=${USER_PASS%:*};
       local PASS=${USER_PASS#*:};
-      svn_args="--username $USER --password $PASS "
+      svn_args="$svn_args --username $USER --password $PASS"
+    fi
+
+    if list_find "$hints" no-check-certificate && [[ $(url_get_prefix "$url") == svn_https ]]; then
+      svn_args="$svn_args --trust-server-cert"
     fi
 
     if test -d $target; then
       message "${MESSAGE_COLOR}Running svn update...${DEFAULT_COLOR}"
-      echo svn update $svn_args --non-interactive -r $SVN_TAG $target
-      svn update $svn_args --non-interactive -r $SVN_TAG $target
+      echo svn update $svn_args -r $SVN_TAG $target
+      svn update $svn_args -r $SVN_TAG $target
       rc=$?
       eval "$dl_target=\"$target\""
     else
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_wget b/var/lib/sorcery/modules/dl_handlers/dl_wget
index 27e5f1f..710f392 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_wget
+++ b/var/lib/sorcery/modules/dl_handlers/dl_wget
@@ -63,7 +63,7 @@ function dl_wget_call_wget()  {
   debug 'dl_wget' "$funcname -- $@"
 
   rm -f $FILE
-  wget $WGET_OPTIONS "$URL" 2>&1 &&
+  wget $WGET_OPTIONS -O "$FILE" "$URL" 2>&1 &&
   if ! test -f "$FILE" ; then
     # stupid http site trying to be nice and re-direct us, this is a failure
     # even though wget doesnt notice it...
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 6f19f11..66d1108 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -117,7 +117,7 @@ function run_conflicts() {
       text="$text ${SPELL_COLOR}${spell_and_default[0]}${MESSAGE_COLOR}?"
 
       if  query  "$text"  ${spell_and_default[1]}  ;  then
-        dispel  ${spell_and_default[0]} || rc=1
+        dispel --nosustain ${spell_and_default[0]} || rc=1
         echo  ${spell_and_default[0]} >>  $CONFLICT_LIST
       else
         echo  $SPELL  >>  $FAILED_LIST
diff --git a/var/lib/sorcery/modules/libdepends b/var/lib/sorcery/modules/libdepends
index 37c1638..d3673a1 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -1636,7 +1636,7 @@ function real_show_up_depends()
     if [[ "$type" == "verbose" ]] ; then
       lock_file "$DEPENDS_STATUS"
       show_up_depends_sub "$1"|while read line; do
-        grep "$line:" "$DEPENDS_STATUS"
+        grep -e "$line:" -e "$line([^)(]*):" "$DEPENDS_STATUS"
       done
       unlock_file "$DEPENDS_STATUS"
     else
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 35590b3..8e4889f 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1108,8 +1108,8 @@ function mk_tmp_dirs() {
 
 
 
-  tmp=$(ls -ld $BASE_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
-  if [[ "$tmp" != "drwxr-xr-x:root:root" ]] ; then
+  tmp=$(ls -lnd $BASE_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
+  if [[ "$tmp" != "drwxr-xr-x:0:0" ]] ; then
     test -d $BASE_DIR &&
     message "$BASE_DIR has unknown permissions and ownership, replacing it" >&2
     rm -rf $BASE_DIR
@@ -1118,21 +1118,21 @@ function mk_tmp_dirs() {
   fi || mk_tmp_dir_error $BASE_DIR
 
   # double check
-  tmp=$(ls -ld $BASE_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
-  if [[ "$tmp" != "drwxr-xr-x:root:root" ]] ; then
+  tmp=$(ls -lnd $BASE_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
+  if [[ "$tmp" != "drwxr-xr-x:0:0" ]] ; then
     mk_tmp_dir_error $BASE_DIR
   fi
 
 
-  tmp=$(ls -ld $SCRIPT_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
-  if [[ "$tmp" != "drwxr-xr-x:root:root" ]] ; then
+  tmp=$(ls -lnd $SCRIPT_DIR 2>/dev/null|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
+  if [[ "$tmp" != "drwxr-xr-x:0:0" ]] ; then
     rm -rf $SCRIPT_DIR
     install -d -o root -g root -m 755 "$SCRIPT_DIR"
   fi || mk_tmp_dir_error $SCRIPT_DIR
 
   # double check
-  tmp=$(ls -ld $SCRIPT_DIR|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
-  if [[ "$tmp" != "drwxr-xr-x:root:root" ]] ; then
+  tmp=$(ls -lnd $SCRIPT_DIR|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
+  if [[ "$tmp" != "drwxr-xr-x:0:0" ]] ; then
     mk_tmp_dir_error $SCRIPT_DIR
   fi
 
@@ -1143,8 +1143,8 @@ function mk_tmp_dirs() {
   fi
 
   install -d -o root -g root -m 755 "$FULL_DIR" || mk_tmp_dir_error $FULL_DIR
-  tmp=$(ls -ld $SCRIPT_DIR|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
-  if [[ "$tmp" != "drwxr-xr-x:root:root" ]] ; then
+  tmp=$(ls -lnd $SCRIPT_DIR|awk '{printf "%s:%s:%s\n" ,$1,$3,$4; }')
+  if [[ "$tmp" != "drwxr-xr-x:0:0" ]] ; then
     mk_tmp_dir_error $FULL_DIR
   fi
 
diff --git a/var/lib/sorcery/modules/libresurrect b/var/lib/sorcery/modules/libresurrect
index f451004..a3d4fe4 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -447,7 +447,7 @@ function internal_install_config_file() {
   # out where it points to and so something, but thats too annoying
   if test -h "$from" ; then
     mkdir -p "$(dirname "$to")" &&
-    cp -pv --no-dereference "$from" "$to"
+    cp -v --no-dereference --preserve=mode,timestamps "$from" "$to"
     return $?
   fi
 
@@ -455,7 +455,7 @@ function internal_install_config_file() {
   if ! test -e "$to" || [[ $STAGED_INSTALL == on ]] ; then
     # copy the new one in (plus leading directories)
     mkdir -p "$(dirname "$to")" &&
-    cp -pv "$from" "$to"
+    cp -v --preserve=mode,timestamps "$from" "$to"
 
   # to get here the file must exist
   elif test -d "$to"; then
@@ -484,7 +484,7 @@ function internal_install_config_file() {
     else
       # replace the file
       mkdir -p "$(dirname "$to")" &&
-      cp -pv "$from" "$to"
+      cp -v --preserve=mode,timestamps "$from" "$to"
     fi
   fi
 }
@@ -532,12 +532,12 @@ function real_handle_changed_config() {
     done
     echo
     case $number in
-      0)  cp -pv "$from" "$to"
+      0)  cp -v --preserve=mode,timestamps "$from" "$to"
           break ;;
-      1)  cp -pv "$to" "$to.$savetime.old"
-          cp -pv "$from" "$to"
+      1)  cp -v --preserve=mode,timestamps "$to" "$to.$savetime.old"
+          cp -v --preserve=mode,timestamps "$from" "$to"
           break ;;
-      2)  cp -pv "$from" "$to.$savetime.new"
+      2)  cp -v --preserve=mode,timestamps "$from" "$to.$savetime.new"
           mark_file_modified "$to"
           # this is deliberatly not track_manual, if this is run from
           # FINAL the user might not have wanted the files tracked
diff --git a/var/lib/sorcery/modules/libtrack b/var/lib/sorcery/modules/libtrack
index fb54bed..ef74990 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -42,10 +42,7 @@ function real_track_manual()  {
     echo "Can't tell installwatch to manually track... installwatch isn't running."
     return 1
   fi
-  local  i
-  for i in $* ; do
-    [ -e $i ] && touch $i
-  done
+  touch -c "$@"
   return 0
 }
 
diff --git a/var/lib/sorcery/modules/libtriggers b/var/lib/sorcery/modules/libtriggers
index a42c099..28d4c5e 100755
--- a/var/lib/sorcery/modules/libtriggers
+++ b/var/lib/sorcery/modules/libtriggers
@@ -149,6 +149,18 @@ function real_on_cast () {
 ## @param spell that triggers
 ## @param action
 ##
+## Used by spells to make adding triggerse nice.
+##
+#---------------------------------------------------------------------
+function real_on_pre_cast() {
+  set_trigger "on_pre_cast" "$1" "$2"
+}
+
+#---------------------------------------------------------------------
+## @Type API
+## @param spell that triggers
+## @param action
+##
 ## Used by spells to make adding triggers nice.
 ##
 #---------------------------------------------------------------------
@@ -189,7 +201,7 @@ function do_trigger () {
         cast -c "${TRIGGER[0]}"
         ;;
       dispel_self)
-        dispel "${TRIGGER[0]}"
+        dispel --nosustain "${TRIGGER[0]}"
         ;;
       check_self)
         cleanse --nofix_quick "${TRIGGER[0]}" ||
diff --git a/var/lib/sorcery/modules/url_handlers/url_git b/var/lib/sorcery/modules/url_handlers/url_git
index 8934911..f07dd76 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git
+++ b/var/lib/sorcery/modules/url_handlers/url_git
@@ -61,9 +61,9 @@ function url_git_bucketize() {
 ##
 #---------------------------------------------------------------------
 function url_git_verify() {
-  local  URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+  local URL GIT_ROOT item
   url_git_crack $1
-  for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+  for item in URL GIT_ROOT; do
     if ! [[ ${!item} ]] ; then
       return 1
     fi
diff --git a/var/lib/sorcery/modules/url_handlers/url_git_http b/var/lib/sorcery/modules/url_handlers/url_git_http
index 12765a2..c88e073 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git_http
+++ b/var/lib/sorcery/modules/url_handlers/url_git_http
@@ -61,9 +61,9 @@ function url_git_http_bucketize() {
 ##
 #---------------------------------------------------------------------
 function url_git_http_verify() {
-  local  URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+  local URL GIT_ROOT item
   url_git_http_crack $1
-  for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+  for item in URL GIT_ROOT; do
     if ! [[ ${!item} ]] ; then
       return 1
     fi
diff --git a/var/lib/sorcery/sustained b/var/lib/sorcery/sustained
index d35b8b2..883ca6d 100755
--- a/var/lib/sorcery/sustained
+++ b/var/lib/sorcery/sustained
@@ -37,7 +37,6 @@ smgl-fhs
 smgl-strip
 smgl-prelink
 tar
-texinfo
 unzip
 util-linux
 wget



More information about the SM-Commit mailing list