Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master quill by Jaka Kranjc (c11068f1226ec00a326529a81976b4e2ee6ea832)
  • Date: Tue, 23 Jan 2007 05:53:58 -0600

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

var/lib/quill/ChangeLog | 1 +
var/lib/quill/modules/libcore | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)

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

libcore: added fallback to su in final_put in case of permission trouble

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index e35707d..f86f9c8 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -4,6 +4,7 @@
* libcore: moved some deletions to quill_final_put_in_grimoire, one
su less
moved some code from quill to create check_source_url{,s}
try also changing the source url suffix before bailing out
+ added fallback to su in final_put in case of permission trouble

2007-01-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libupdate: try harder to find the real spelldir when copying to git
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 5603400..b728c77 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -196,10 +196,10 @@ function quill_final_put_in_grimoire() {
message "Copying spell into $QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME
..."

quill_final_put_in_grimoire_sub(){
- mkdir -p $QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME
+ mkdir -p $QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME || return 1

# we wipe it first, so we can handle any files that we deleted before
- rm -r "$QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME"
+ rm -r "$QUILL_GRIM_NAME/$QUILL_SECT_NAME/$SPELL_NAME" || return 1

cp -r $QUILL_SPELL_DIR/$SPELL_NAME $QUILL_GRIM_NAME/$QUILL_SECT_NAME/
if [[ $? != 0 ]]; then
@@ -217,6 +217,13 @@ function quill_final_put_in_grimoire() {

if [[ -w $QUILL_GRIM_NAME && -w $QUILL_GRIM_NAME/$QUILL_SECT_NAME ]]; then
quill_final_put_in_grimoire_sub $3
+ if [[ $? == 1 ]]
+ then
+ error_msg "Permission problems, trying as root ..."
+ export QUILL_GRIM_NAME QUILL_SECT_NAME QUILL_SPELL_DIR SPELL_NAME
+ su -c "$(declare -f quill_final_put_in_grimoire_sub); \
+ quill_final_put_in_grimoire_sub $3"
+ fi
else
export QUILL_GRIM_NAME QUILL_SECT_NAME QUILL_SPELL_DIR SPELL_NAME
su -c "$(declare -f quill_final_put_in_grimoire_sub); \



  • [SM-Commit] GIT changes to master quill by Jaka Kranjc (c11068f1226ec00a326529a81976b4e2ee6ea832), Jaka Kranjc, 01/23/2007

Archive powered by MHonArc 2.6.24.

Top of Page