Skip to Content.
Sympa Menu

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

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 (1273131d94ff87762159e2d2efcbbf420a3e058c)
  • Date: Tue, 30 Jan 2007 07:32:21 -0600

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

todo | 6 ++++--
usr/bin/quill | 35 ++++++++++++++++++++++++++++++-----
var/lib/quill/ChangeLog | 6 ++++++
var/lib/quill/modules/libcore | 7 +++++--
var/lib/quill/modules/libupdate | 3 ++-
var/lib/quill/version | 2 +-
6 files changed, 48 insertions(+), 11 deletions(-)

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

fixed searching for spells with + in their name
don't discriminate the beautiful syntax and substitute them too
check_source_url now reckognizes dns failures too
lowercase QUILL_TARGET (spell name) when parsing
also checks WEB_SITE now
added notice about casting the old spell #13474

diff --git a/todo b/todo
index d080fd9..d19465f 100644
--- a/todo
+++ b/todo
@@ -1,6 +1,6 @@
post 0.2 things that would be cool to have done:
new menu choices
- * 'Manage patches'
+ * 'Manage patches'
add/remove them and their references in PRE_BUILD
add/remove PRE_BUILD

@@ -11,13 +11,15 @@ new menu choices
* 'Convert to upstream signing'
try automatically on updates (check for .sig)?

+ * 'list/remove files?'
+
update mode:
* create a main_update_loop and use it in the patching case too
* clean the namespace by moving more stuff into functions, using locals and
documenting global vars used in all functions

improvements in the standard mode:
- * use some of the functions from update mode,
+ * use some of the functions from update mode,
especially the verification stuff
* handle bad entries and ^C better
* use summon and more of the sorcery code?
diff --git a/usr/bin/quill b/usr/bin/quill
index 5c60988..2fbf041 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -342,6 +342,18 @@ then
continue
fi

+ # check if WEB_SITE is reachable
+ WEB_SITE=$(. DETAILS &> /dev/null; echo $WEB_SITE)
+ if wget -S --spider "$WEB_SITE" 2>&1 | grep -Eq "ERROR 404|service
not known"
+ then
+ error_msg "The website is not reachable: $WEB_SITE"
+ message "Fix it."
+ sleep 3
+ quill_edit DETAILS
+ add_history_entry "DETAILS: fixed WEB_SITE"
+ echo
+ fi
+
rm DETAILS.orig
if query "Do you want to review the update or add custom
modifications?" y
then
@@ -403,11 +415,24 @@ then
quill_final_put_in_grimoire $GRIMOIRE $SECTION no
;;
"${actions[6]}") #"Try it out"
- if query "Do you want to cast -r? (possibly needed for multiversion
spells)" n; then
- cast -r $SPELL_NAME
- else
- cast -c $SPELL_NAME
- fi
+ codex_get_spell_paths $(codex_find_spell_by_name $SPELL_NAME)
+ if [[ ! -e $GRIMOIRE/$SECTION/$SPELL_NAME ]]
+ then
+ error_msg "Origin not found! Very severe!"
+ continue
+ fi
+
+ if diff -q $QUILL_SPELL_DIR/$SPELL_NAME
$GRIMOIRE/$SECTION/$SPELL_NAME -x DETAILS.orig > /dev/null
+ then
+ # there is no difference
+ query "Are you sure you want to cast the unchanged spell from the
grimoire?" y ||
+ continue
+ fi
+ if query "Do you want to cast -r? (possibly needed for multiversion
spells)" n; then
+ cast -r $SPELL_NAME
+ else
+ cast -c $SPELL_NAME
+ fi
;;
esac

diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index de49563..f629efc 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,8 +1,14 @@
2007-01-25 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libupdate: added -quit to the find in copy_git_sub to speed it up
+ fixed searching for spells with + in their name
* libcore: fix version print in quill_help
+ don't discriminate the beautiful syntax and substitute them too
+ check_source_url now reckognizes dns failures too
+ lowercase QUILL_TARGET (spell name) when parsing
* quill: add codex_get_spell_paths fallback
fixed the hash check to not be too strict anymore
+ also checks WEB_SITE now
+ added notice about casting the old spell #13474
* libcore, quill: copyright 2007
* version: 0.2.1

diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 06733e9..b7bd77c 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -342,6 +342,9 @@ function check_source_urls() {
# we don't know if the SOURCE is expanded or not, trying just both
extremes
substitute_with_variables old_source "$SPELL_NAME" {SPELL}
"$SPELL_VERSION" {VERSION}
sed -i "s,$old_source,$source," DETAILS
+ # and with the beautiful syntax last
+ old_source="$(tr -d "{}" <<< "$old_source")"
+ sed -i "s,$old_source,$source," DETAILS
add_history_entry "DETAILS: Changed SOURCE${i} extension"
fi

@@ -377,7 +380,7 @@ function check_source_url() {
elif grep -q http:// <<< "$su"
then
# the return value acrobatics make both blocks return the same
- wget -S --spider "$su" 2>&1 | grep -q "ERROR 404"
+ wget -S --spider "$su" 2>&1 | grep -Eq "ERROR 404|service not known"
if [[ $? == 0 ]]
then
rc=1
@@ -436,7 +439,7 @@ function check_parameter() {
[[ -z $1 ]] &&
error_msg "Missing parameter" &&
quill_help 101 ||
- QUILL_TARGET="$1"
+ QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$1")
}

#---
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index b20c4aa..6acadf9 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -106,7 +106,8 @@ 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" -regex
"${QUILL_GIT_DIR%/}/[^/]*/[^/]*/$SPELL_NAME$" -type d -printf "%h\n" -quit)
+ # + is the only regex char that is problematic here AND is used in names
+ SECTION2=$(find "$QUILL_GIT_DIR" -regex
"${QUILL_GIT_DIR%/}/[^/]*/[^/]*/${SPELL_NAME//+/\+}$" -type d -printf "%h\n"
-quit)
if [[ -z $SECTION2 ]]
then
error_msg "Couldn't find the spell, \$QUILL_GIT_DIR is probably bad!"
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 3b04cfb..0c62199 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2
+0.2.1



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

Archive powered by MHonArc 2.6.24.

Top of Page