Skip to Content.
Sympa Menu

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

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 (12d5a78888cec76c9b4ddcf395297c2acfa2d3b7)
  • Date: Mon, 22 Jan 2007 17:03:18 -0600

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

usr/bin/quill | 26 ++++++++++++++++++++++----
var/lib/quill/ChangeLog | 7 +++++++
var/lib/quill/modules/libupdate | 4 +++-
3 files changed, 32 insertions(+), 5 deletions(-)

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

* libupdate: try harder to find the real spelldir when copying to git
* quill: ask for where to copy from when starting an update
added another check, so missing gpg/hash variables are caught nicely
fixed the multiversion check to use the already stripped value
fixed error messages appearing from missing $PWD

diff --git a/usr/bin/quill b/usr/bin/quill
index 15e54d9..77518f0 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -158,11 +158,20 @@ then
if [[ $ANSWER != ${actions[3]} && $ANSWER != ${actions[4]} && $ANSWER !=
${actions[5]} && $ANSWER != ${actions[6]} ]]
then
#copy spell over and move there
- codex_get_spell_paths $(codex_find_spell_by_name $SPELL_NAME)
- rm -fr $QUILL_SPELL_DIR/$SPELL_NAME
- cp -r $SECTION_DIRECTORY/$SPELL_NAME $QUILL_SPELL_DIR
+ echo
+ query_msg "Do you want to copy the spell from the grimoire or
QUILL_GIT_DIR?"
+ if query "Answer y for grimoire, n for QUILL_GIT_DIR:" y
+ then
+ codex_get_spell_paths $(codex_find_spell_by_name $SPELL_NAME)
+ cd $QUILL_SPELL_DIR
+ rm -fr $QUILL_SPELL_DIR/$SPELL_NAME
+ cp -r $SECTION_DIRECTORY/$SPELL_NAME $QUILL_SPELL_DIR
+ else
+ copy_from_git || continue
+ fi
cd $QUILL_SPELL_DIR/$SPELL_NAME
cp DETAILS DETAILS.orig
+ echo
fi
case "$ANSWER" in
"${actions[0]}") #"Update the spell to a newer version"
@@ -186,7 +195,7 @@ then
sed -i
"s/\<VERSION=['\"]*${version}['\"]*\s*$/VERSION=$SPELL_VERSION/" DETAILS

#check for multiversion spells
- if [[ $(grep -cE "\<VERSION=" DETAILS) != 1 ]]
+ if [[ ${#versions[@]} != 1 ]]
then #we have a problem
message "Oh dear, detected a multiversion spell. Going to cat
DETAILS for you "
message "and then you will tell me which variable I need to
set, so I can get "
@@ -274,6 +283,15 @@ then
# use the original DETAILS, as we already changed the VERSION
current_check=$(eval ${if_var:-:}; . DETAILS.orig &>
/dev/null; eval echo \$SOURCE${i}_HASH\$SOURCE${i}_GPG\$SOURCE${i}_IGNORE)

+ if [[ -z $current_check ]]
+ then
+ error_msg "Missing
SOURCE${i}_HASH/SOURCE${i}_GPG/SOURCE${i}_IGNORE"
+ message "Add the appropriate one!"
+ [[ ! $i ]] && i=1
+ let i+=1
+ continue
+ fi
+
#skip SOURCE_IGNORE
if grep -Eq "volatile|signature|unversioned" <<<
"$current_check"
then
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index ef43475..9472ecf 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,4 +1,11 @@
2007-01-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libupdate: try harder to find the real spelldir when copying to git
+ * quill: ask for where to copy from when starting an update
+ added another check, so missing gpg/hash variables are caught nicely
+ fixed the multiversion check to use the already stripped value
+ fixed error messages appearing from missing $PWD
+
+2007-01-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* quill: fixed the multiversion check to actually look at the versions
added some more sanity checks
aded "Copy it back from under QUILL_GIT_DIR" option, removed wierd
gpg
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index ee55e81..4623e14 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -104,7 +104,7 @@ function copy_git_sub()

# find where under $QUILL_GIT_DIR the spell actually is
# perhaps the section path is /home/navaden/sorcery/git/gnome1-libs
- SECTION2=$(find "$QUILL_GIT_DIR" -name $SPELL_NAME -type d -printf %h)
+ SECTION2=$(find "$QUILL_GIT_DIR" -name $SPELL_NAME -type d -printf "%h\n"|
grep "${QUILL_GIT_DIR%/}/[^/]*/[^/]*$")
if [[ -z $SECTION2 ]]
then
error_msg "Couldn't find the spell, \$QUILL_GIT_DIR is probably bad!"
@@ -138,6 +138,7 @@ function copy_from_git()
copy_git_sub || return 1

# we wipe it first, so we can handle any files that were deleted
+ cd $QUILL_SPELL_DIR
rm -r "$QUILL_SPELL_DIR/$SPELL_NAME"

if [[ -w $QUILL_SPELL_DIR ]]
@@ -147,6 +148,7 @@ function copy_from_git()
su -c "cp -r '$GRIMOIRE2/$SECTION2/$SPELL_NAME' '$QUILL_SPELL_DIR'"
fi
unset GRIMOIRE2 SECTION2
+ cd $QUILL_SPELL_DIR/$SPELL_NAME
}

#---



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

Archive powered by MHonArc 2.6.24.

Top of Page