New commits:
commit 29f723564fea5b7d250f10db111f20f0c0ecae17
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
resurrect: consistently only dispel the target if there is a cache we
can resurrect later
commit c6dfd922e27c50b7d4e4ad1ea7cb309cc014ae45
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 17bb347532992773e18174c08b909fe01535a598
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
libsorcery: fixed save_libraries and save_binaries to be whitespace
proof #15286
commit 3343bb99b0296d51529191d495602679f38274e0
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
diff --git a/ChangeLog b/ChangeLog
index ff1af46..26d53b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-19 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * config: made BUILD_DIRECTORY ignore INSTALL_ROOT and user
changeable,
+ modified patch by eekee #15234
+ * libsorcery: fixed save_libraries and save_binaries to be whitespace
+ proof #15286
+ * libmisc: mk_tmp_dirs now works also for nonroot-but-uid0 users,
patch
+ by ruskie #15269
+ * resurrect: consistently only dispel the target if there is a cache
we
+ can resurrect later
+
2009-05-27 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* dl_git: fixed syntax error
* libresurrect: fixed installing of spell files from user owned
diff --git a/etc/sorcery/config b/etc/sorcery/config
index 40fbd78..c5b4b59 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -190,7 +190,8 @@ PROGRESS_SPINNER_CHARS=${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/usr/sbin/resurrect b/usr/sbin/resurrect
index 8ec3b66..5fa1e7c 100755
--- a/usr/sbin/resurrect
+++ b/usr/sbin/resurrect
@@ -76,15 +76,6 @@ function do_resurrect() {
return 1
fi
- if spell_installed $spell; then
- message "Dispelling $spell $(installed_version $spell) ..."
- dispel_spell $spell
- if [[ $? != 0 ]]; then
- error_message "$error_base the dispel failed.$DEFAULT_COLOR"
- return 1
- fi
- fi
-
local chosen_version
if [[ -n $requested_version ]]; then
chosen_version=$requested_version
@@ -128,6 +119,15 @@ function do_resurrect() {
fi
fi
+ if spell_installed $spell; then
+ message "Dispelling $spell $(installed_version $spell) ..."
+ dispel_spell $spell
+ if [[ $? != 0 ]]; then
+ error_message "$error_base the dispel failed.$DEFAULT_COLOR"
+ return 1
+ fi
+ fi
+
SUCCESS_LIST=/dev/null
FAILED_LIST=/dev/null
resurrect_spell $spell "$chosen_version"
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index a835713..16559fd 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1145,8 +1145,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
@@ -1155,21 +1155,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